]> git.mxchange.org Git - friendica.git/commitdiff
log db error strings in all cases
authorfriendica <info@friendica.com>
Mon, 30 Apr 2012 02:41:17 +0000 (19:41 -0700)
committerfriendica <info@friendica.com>
Mon, 30 Apr 2012 02:41:17 +0000 (19:41 -0700)
include/dba.php

index 414f4ae7a7edf3d2e8eb65929346e5bb7be9042e..c9f880241ba9003d38cc2a356c90e62daeb7fc59 100644 (file)
@@ -74,9 +74,9 @@ class dba {
                
                if((! $this->db) || (! $this->connected))
                        return false;
-
-               $this->error = '';
                
+               $this->error = '';
+
                if($this->mysqli)
                        $result = @$this->db->query($sql);
                else
@@ -122,7 +122,7 @@ class dba {
                 */
 
                if($result === false) {
-                       logger('dba: ' . printable($sql) . ' returned 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);
                }