Merge pull request #3905 from Icinga/revert-3836-fix/query-double-execution

Revert "Fix double query execution"
This commit is contained in:
Eric Lippmann 2019-08-07 13:34:53 +02:00 committed by GitHub
commit 97a679dbb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 11 deletions

View File

@ -450,17 +450,7 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
*/
public function hasResult()
{
if ($this->iteratorPosition !== null) {
return true;
}
$hasResult = false;
foreach ($this as $row) {
$hasResult = true;
break;
}
return $hasResult;
return $this->iteratorPosition !== null || $this->fetchRow() !== false;
}
/**