Skip to content

Commit

Permalink
Merge pull request #323 from seamuslee001/fix_error_php8
Browse files Browse the repository at this point in the history
[php8-compat] Fix calling method_exist with paremeter that is bool not an object in…
  • Loading branch information
eileenmcnaughton authored May 29, 2021
2 parents 109d876 + 87aee42 commit 2866059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DB/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -2804,7 +2804,7 @@ function _query($string)
if (!empty($_DB_DATAOBJECT['CONFIG']['debug'])) {
$this->debug(serialize($result), 'RESULT',5);
}
if (method_exists($result, 'numRows')) {
if (is_object($result) && method_exists($result, 'numRows')) {
if ($_DB_driver == 'DB') {
$DB->expectError(DB_ERROR_UNSUPPORTED);
} else {
Expand Down

0 comments on commit 2866059

Please sign in to comment.