From: Michael Date: Thu, 16 Mar 2017 09:23:12 +0000 (+0000) Subject: Bugfix: When a query fails we mustn't use the result value. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=58bf1c50afc1c442776c549b2481939b157269dc;p=friendica.git Bugfix: When a query fails we mustn't use the result value. --- diff --git a/include/dba.php b/include/dba.php index 4b0498ad3c..62728acaed 100644 --- a/include/dba.php +++ b/include/dba.php @@ -234,7 +234,9 @@ class dba { case 'pdo': $result = @$this->db->query($sql); // Is used to separate between queries that returning data - or not - $columns = $result->columnCount(); + if (!is_bool($result)) { + $columns = $result->columnCount(); + } break; case 'mysqli': $result = @$this->db->query($sql); @@ -329,7 +331,7 @@ class dba { } } - if (($result === true) || ($result === false)) { + if (is_bool($result)) { return $result; } if ($onlyquery) {