MySQLi requires at least a link resource for all its functions/methods #2
authorRoland Häder <roland@mxchange.org>
Thu, 20 Jun 2013 20:54:21 +0000 (20:54 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Jun 2013 20:54:21 +0000 (20:54 +0000)
inc/db/lib-mysqli.php

index 02d0c8e..46b343f 100644 (file)
@@ -341,7 +341,7 @@ function sqlEscapeString ($str, $secureString = TRUE, $strip = TRUE) {
 // Log SQL errors to debug.log in installation phase or call reportBug()
 function sqlError ($file, $line, $message) {
        // Remember plain error in last_sql_error
-       $GLOBALS['last_sql_error'] = mysqli_error();
+       $GLOBALS['last_sql_error'] = mysqli_error(getSqlLink());
 
        // Is login set?
        if (!empty($GLOBALS['mysql']['login'])) {