From 082398d5872064d3911c62b085e8a134569f626b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 20 Jun 2013 20:52:57 +0000 Subject: [PATCH] MySQLi requires at least a link resource for all its functions/methods --- inc/db/lib-mysqli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/db/lib-mysqli.php b/inc/db/lib-mysqli.php index 85e9c0a03c..02d0c8e5da 100644 --- a/inc/db/lib-mysqli.php +++ b/inc/db/lib-mysqli.php @@ -276,7 +276,7 @@ function sqlFreeResult ($resource) { // Get id from last INSERT command and secure id function getSqlInsertId () { if (!isSqlLinkUp()) return FALSE; - return bigintval(mysqli_insert_id()); + return bigintval(mysqli_insert_id(getSqlLink())); } // Escape a string for the database -- 2.39.5