]> git.mxchange.org Git - friendica.git/blobdiff - include/dba.php
Merge branch 'master' of https://github.com/friendica/friendica
[friendica.git] / 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);
                }