]> git.mxchange.org Git - friendica.git/commitdiff
Error reporting hadn't worked for the new functions
authorMichael <heluecht@pirati.ca>
Mon, 1 May 2017 21:38:37 +0000 (21:38 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 1 May 2017 21:38:37 +0000 (21:38 +0000)
include/dba.php

index 924c31e05f3901d42eb560b180764e01a275a3f9..1ee266215013894e789a8d5264eee69a7ccacedc 100644 (file)
@@ -520,7 +520,7 @@ class dba {
                                }
 
                                if (!$stmt->execute()) {
-                                       $errorInfo = self::$dbo->db->errorInfo();
+                                       $errorInfo = $stmt->errorInfo();
                                        self::$dbo->error = $errorInfo[2];
                                        self::$dbo->errorno = $errorInfo[1];
                                        $retval = false;
@@ -532,8 +532,8 @@ class dba {
                                $stmt = self::$dbo->db->stmt_init();
 
                                if (!$stmt->prepare($sql)) {
-                                       self::$dbo->error = self::$dbo->db->error;
-                                       self::$dbo->errorno = self::$dbo->db->errno;
+                                       self::$dbo->error = $stmt->error;
+                                       self::$dbo->errorno = $stmt->errno;
                                        $retval = false;
                                        break;
                                }