File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -99,25 +99,24 @@ private function set_admin() {
99
99
/**
100
100
* Connects to PHP Console.
101
101
*
102
+ * PHP Console needs to hook in session, in WordPress we need to be in 'init':
103
+ * @link http://silvermapleweb.com/using-the-php-session-in-wordpress/
102
104
* @internal action hook callback
103
105
*
104
106
* @since 1.4.0
105
107
*/
106
108
public function connect () {
107
109
108
- /**
109
- * PhpConsole needs to hook in session, in WordPress we need to be in 'init':
110
- * @link http://silvermapleweb.com/using-the-php-session-in-wordpress/
111
- */
112
110
if ( ! @session_id () ) {
113
111
@session_start ();
114
112
}
115
113
116
-
117
114
if ( ! $ this ->connector instanceof PhpConsole \Connector ) {
118
115
try {
119
116
$ this ->connector = PhpConsole \Connector::getInstance ();
120
- } catch ( \Exception $ e ) {}
117
+ } catch ( \Exception $ e ) {
118
+ return ;
119
+ }
121
120
}
122
121
123
122
// apply PHP Console options
@@ -195,7 +194,7 @@ private function apply_options() {
195
194
public function init () {
196
195
197
196
// get PHP Console extension password
198
- $ password = isset ( $ this -> options [ ' password ' ] ) ? trim ( $ this ->options ['password ' ] ) : null ;
197
+ $ password = trim ( $ this ->options ['password ' ] );
199
198
200
199
if ( empty ( $ password ) ) {
201
200
You can’t perform that action at this time.
0 commit comments