We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f36abbc commit 807b528Copy full SHA for 807b528
includes/class-wp-php-console.php
@@ -126,16 +126,20 @@ private function set_admin() {
126
}
127
128
129
-
130
+
131
/**
132
* Connect to PHP Console.
133
*
134
* @since 1.4.0
135
*/
136
public function connect() {
137
138
- session_start();
+ // PhpConsole needs to hook in session, in WordPress we need to be in 'init'
139
+ // @link http://silvermapleweb.com/using-the-php-session-in-wordpress/
140
+ if ( ! session_id() ) {
141
+ session_start();
142
+ }
143
144
if ( ! $this->connector instanceof PhpConsole\Connector ) {
145
$this->connector = PhpConsole\Connector::getInstance();
0 commit comments