if ((ifFatalErrorsDetected()) && (isInstaller())) {
// This may happen in installation phase
return;
- } elseif ((!is_resource($link)) && (!is_null($link))) {
+ } elseif ((!is_resource($link)) && (!is_null($link)) && (!$link instanceof mysqli)) {
// This should never happen!
- reportBug($file . ':' . __FUNCTION__, $line . ':' . __LINE__, sprintf('Type of link is not resource or null, type=%s', gettype($link)));
+ reportBug($file . ':' . __FUNCTION__, $line . ':' . __LINE__, sprintf('Type of link is not resource, null or mysqli class, type=%s', gettype($link)));
} // END - if
// Set it
$GLOBALS['__sql_link'] = $link;
// Re-init cache
- $GLOBALS['__is_sql_link_up'] = is_resource($link);
+ $GLOBALS['__is_sql_link_up'] = isValidSqlLink($link);
}
// Checks if the link is up