Error reporting hadn't worked for the new functions

This commit is contained in:
Michael 2017-05-01 21:38:37 +00:00
parent 0241a88c0d
commit d106ff5086
1 changed files with 3 additions and 3 deletions

View File

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