]> git.mxchange.org Git - mailer.git/commitdiff
Better use isValidSqlLink() (driver-dependent) than is_resource() which worked only...
authorquix0r <quix0r@mxchange.org>
Mon, 29 Jul 2013 22:04:18 +0000 (22:04 +0000)
committerquix0r <quix0r@mxchange.org>
Mon, 29 Jul 2013 22:04:18 +0000 (22:04 +0000)
inc/ajax/ajax_installer.php
inc/sql-functions.php

index 0031a183cda8e4883a92fb618b56b935082ff5a5..5e6bf0d664c04a4c94d9d2b48caef3a3920ed4b6 100644 (file)
@@ -62,7 +62,7 @@ function establishAjaxInstallerDatabaseLink () {
        $linkResource = sqlConnectToDatabase(getSession('mysql_host'), getSession('mysql_login'), getSession('mysql_password1'), __FUNCTION__, __LINE__);
 
        // Is this a link resource?
-       if (!is_resource($linkResource)) {
+       if (!isValidSqlLink($linkResource)) {
                // Is not a resource
                reportBug(__FUNCTION__, __LINE__, 'linkResource[]=' . gettype($linkResource) . ', expected: link resource');
        } elseif (!isSqlLinkUp()) {
index 9e82b02dafca1baa693075ec9754f159801c5fcc..cc16793be78e0998efd184fb41cfb5c13aca1a87 100644 (file)
@@ -585,7 +585,7 @@ function ifSqlTableExists ($tableName) {
                        array($tableName), __FUNCTION__, __LINE__);
 
                // Is a link there?
-               if (!is_resource($result)) {
+               if (!isValidSqlLink($result)) {
                        // Is installation phase?
                        if (isInstaller()) {
                                // Then silently abort here
@@ -630,7 +630,7 @@ function ifSqlTableColumnExists ($tableName, $columnName, $forceFound = FALSE) {
                ), __FUNCTION__, __LINE__);
 
        // Is a link there?
-       if (!is_resource($result)) {
+       if (!isValidSqlLink($result)) {
                // Is installation phase?
                if (isInstaller()) {
                        // Then silently abort here
@@ -672,7 +672,7 @@ function ifSqlTableIndexExist ($tableName, $keyName, $forceFound = FALSE) {
        $result = sqlQueryEscaped("SHOW INDEX FROM `%s`", array($tableName), __FUNCTION__, __LINE__);
 
        // Is a link there?
-       if (!is_resource($result)) {
+       if (!isValidSqlLink($result)) {
                // Is installation phase?
                if (isInstaller()) {
                        // Then silently abort here