SQL_IS_LINK_UP() aborts if wether no resource or null is given
[mailer.git] / inc / db / lib-mysql3.php
index c98de977be81d2937759380e69ac50f6403a82c9..10372a4a3b45e759e37384798d5302e10eac3ce3 100644 (file)
@@ -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;
 }