X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdba_pdo.php;h=7b720fb6c1217e31be5ae0368ea9facbdfcf229e;hb=810843763dcde2a004f992dc23c928a45ab8184b;hp=7cd8c638e7f60955364b93b3ea84a591a5b29adc;hpb=f23f6ca9c6e358113e2d0d735ac3e1a23d7731dd;p=friendica.git diff --git a/include/dba_pdo.php b/include/dba_pdo.php index 7cd8c638e7..7b720fb6c1 100644 --- a/include/dba_pdo.php +++ b/include/dba_pdo.php @@ -126,6 +126,7 @@ class dba { # bad workaround to emulate the bizzare behavior of mysql_query if(in_array($strSQLType, array('INSERT', 'UPDATE', 'DELETE', 'CREATE', 'DROP', 'SET'))) $result = true; + $intErrorCode = false; } catch (\Exception $objException) { $result = false; @@ -181,13 +182,13 @@ class dba { * These usually indicate SQL syntax errors that need to be resolved. */ - if($result === false) { + if(isset($result) AND ($result === false)) { logger('dba: ' . printable($sql) . ' returned false.' . "\n" . $this->error); if(file_exists('dbfail.out')) file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . ' returned false' . "\n" . $this->error . "\n", FILE_APPEND); } - if(($result === true) || ($result === false)) + if(isset($result) AND (($result === true) || ($result === false))) return $result; if ($onlyquery) {