Skip to content

Commit

Permalink
Minor source code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stefangabos committed Jan 2, 2019
1 parent 9fdb94b commit 6094ceb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Zebra_Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,7 @@ function read($session_id) {
$result = $this->_mysql_query('SELECT GET_LOCK("' . $this->session_lock . '", ' . $this->_mysql_real_escape_string($this->lock_timeout) . ')');

// stop if there was an error
if (!$result || mysqli_num_rows($result) != 1 || !($row = mysqli_fetch_array($result)) || $row[0] != 1) {
throw new Exception('Zebra_Session: Could not obtain session lock!');
}
if (!$result || mysqli_num_rows($result) != 1 || !($row = mysqli_fetch_array($result)) || $row[0] != 1) throw new Exception('Zebra_Session: Could not obtain session lock!');

// reads session data associated with a session id, but only if
// - the session ID exists;
Expand Down Expand Up @@ -757,9 +755,7 @@ private function _mysql_query($query) {
$result = mysqli_query($this->link, $query);

// stop if there was an error
if (!$result) {
throw new Exception($this->_mysql_error());
}
if (!$result) throw new Exception($this->_mysql_error());

// return the result if query was successful
return $result;
Expand Down

0 comments on commit 6094ceb

Please sign in to comment.