From 1ae27b893dd19a4992beb49fa904cb2bc18578b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 21 Sep 2008 16:24:21 +0000 Subject: [PATCH] Fix for SQL_FREERESULT() --- inc/databases.php | 2 +- inc/db/lib-mysql3.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/databases.php b/inc/databases.php index a425cc1b84..6793b0f1d3 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "380"); +define('CURR_SVN_REVISION', "381"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 3f26d2ce90..1a24f39289 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -213,6 +213,11 @@ function SQL_CLOSE(&$link, $F, $L) { } // SQL free result function SQL_FREERESULT($result) { + if (!is_resource($result)) { + // Abort here + return false; + } // END - if + $res = @mysql_free_result($result); return $res; } -- 2.39.5