Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1469 → Rev 1471

/trunk/includes/classes/OIDplusQueryResult.class.php
72,7 → 72,7
if (!$this->containsResultSet()) throw new OIDplusException(_L('The query has returned no result set (i.e. it was not a SELECT query)'));
 
if (!is_null($this->prefetchedArray)) {
return count($this->prefetchedArray) + $this->countAlreadyFetched;
return count($this->prefetchedArray);
}
 
$ret = $this->do_num_rows();
136,8 → 136,7
if (!$this->containsResultSet()) throw new OIDplusException(_L('The query has returned no result set (i.e. it was not a SELECT query)'));
if (!is_null($this->prefetchedArray)) {
// Prefetched value exists. Use it.
//$ary = array_shift($this->prefetchedArray);
$ary = $this->prefetchedArray[$this->countAlreadyFetched] ?? null; // Performance is better this way
$ary = $this->prefetchedArray[$this->countAlreadyFetched] ?? null;
} else {
$reflector = new \ReflectionMethod($this, 'do_fetch_array');
$isImplemented = ($reflector->getDeclaringClass()->getName() !== self::class);
181,8 → 180,7
if (!$this->containsResultSet()) throw new OIDplusException(_L('The query has returned no result set (i.e. it was not a SELECT query)'));
if (!is_null($this->prefetchedArray)) {
// Prefetched value exists (as array). Convert and use it.
//$ary = array_shift($this->prefetchedArray);
$ary = $this->prefetchedArray[$this->countAlreadyFetched] ?? null; // Performance is better this way
$ary = $this->prefetchedArray[$this->countAlreadyFetched] ?? null;
$obj = is_null($ary) ? null : array_to_stdobj($ary);
} else {
$reflector = new \ReflectionMethod($this, 'do_fetch_object');