Skip to content

Commit

Permalink
Remove newline, edit phpdoc, bail on exception
Browse files Browse the repository at this point in the history
  • Loading branch information
unfulvio committed May 22, 2019
1 parent 828998c commit fc7afcd
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions includes/class-wp-php-console.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,25 +99,24 @@ private function set_admin() {
/**
* Connects to PHP Console.
*
* PHP Console needs to hook in session, in WordPress we need to be in 'init':
* @link http://silvermapleweb.com/using-the-php-session-in-wordpress/
* @internal action hook callback
*
* @since 1.4.0
*/
public function connect() {

/**
* PhpConsole needs to hook in session, in WordPress we need to be in 'init':
* @link http://silvermapleweb.com/using-the-php-session-in-wordpress/
*/
if ( ! @session_id() ) {
@session_start();
}


if ( ! $this->connector instanceof PhpConsole\Connector ) {
try {
$this->connector = PhpConsole\Connector::getInstance();
} catch ( \Exception $e ) {}
} catch ( \Exception $e ) {
return;
}
}

// apply PHP Console options
Expand Down Expand Up @@ -195,7 +194,7 @@ private function apply_options() {
public function init() {

// get PHP Console extension password
$password = isset( $this->options['password'] ) ? trim( $this->options['password'] ) : null;
$password = trim( $this->options['password'] );

if ( empty( $password ) ) {

Expand Down

0 comments on commit fc7afcd

Please sign in to comment.