Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Proposed grouping of if statements

  • Loading branch information...
commit 50641bb65e366564b73961f872d966e5d593358e 1 parent 84ce785
@brbrbr authored
Showing with 6 additions and 10 deletions.
  1. +6 −10 libraries/joomla/database/database.php
View
16 libraries/joomla/database/database.php
@@ -934,13 +934,11 @@ public function loadColumn($offset = 0)
public function loadNextObject($class = 'stdClass')
{
- if ( ! $this->cursor ) {
- // Execute the query and get the result set cursor.
- if (!($this->cursor = $this->query()))
- {
+ if ( ! $this->cursor && !($this->cursor = $this->query()))
+ {
return $this->errorNum ? null : false;
- }
}
+
// Get the next row from the result set as an object of type $class.
@@ -969,13 +967,11 @@ public function loadNextRow()
- if ( ! $this->cursor ) {
- // Execute the query and get the result set cursor.
- if (!($this->cursor = $this->query()))
- {
+ if ( ! $this->cursor && !($this->cursor = $this->query()))
+ {
return $this->errorNum ? null : false;
- }
}
+
// Get the next row from the result set as an object of type $class.
Please sign in to comment.
Something went wrong with that request. Please try again.