Skip to content

Commit 9a9a0bf

Browse files
committed
trying another storage with PhpConsole
1 parent f5bf1e8 commit 9a9a0bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/class-wp-php-console.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ public function __construct() {
6565
// By default PHP Console uses PhpConsole\Storage\Session for postponed responses,
6666
// so all temporary data will be stored in $_SESSION.
6767
// But there is some problem with frameworks like WordPress that override PHP session handler.
68-
$php_console = new PhpConsole\Connector;
69-
$php_console->setPostponeStorage( new PhpConsole\Storage\File( '/tmp/pc.data' ) );
68+
PhpConsole\Connector::setPostponeStorage( new PhpConsole\Storage\File( '/tmp/pc.data' ) );
7069

7170
// Perform PHP Console initialisation required asap for other code to be able to output to the JavaScript console
72-
$connector = $php_console::getInstance();
71+
$connector = PhpConsole\Connector::getInstance();
7372

7473
// Apply 'register' option to PHP Console
7574
if ( ! empty( $this->options['register'] ) ) {

0 commit comments

Comments
 (0)