From e0f29b44879d7aba8e9b7c95b248910375c2312a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 28 Feb 2009 23:46:35 +0000 Subject: [PATCH] SQL_IS_LINK_UP() aborts if wether no resource or null is given --- inc/db/lib-mysql3.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index c98de977be..10372a4a3b 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -385,6 +385,12 @@ function SQL_GET_LINK () { // Setter for link function SQL_SET_LINK ($link) { + // Is this a resource or null? + if ((!is_resource($link)) && (!is_null($link))) { + // This should never happen! + trigger_error(sprintf("link is not resource or null. Type: %s", gettype($link))); + } // END - if + // Set it $GLOABLS['sql_link'] = $link; } -- 2.39.5