]> git.mxchange.org Git - mailer.git/commitdiff
Added isset() for fixing missing array element 'cache_instance'
authorRoland Häder <roland@mxchange.org>
Sat, 28 Feb 2009 21:57:04 +0000 (21:57 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 28 Feb 2009 21:57:04 +0000 (21:57 +0000)
inc/extensions.php
inc/modules/admin/admin-inc.php

index b5185feee6938b738f1537dca98ea049f31ffe52..7ed3d4943421a8f3f4068b01758fdb77650e5b57 100644 (file)
@@ -380,7 +380,7 @@ function GET_EXT_VERSION ($ext_name) {
 
                // Count cache hits
                incrementConfigEntry('cache_hits');
-       } elseif (!is_object($GLOBALS['cache_instance'])) {
+       } elseif ((!isset($GLOBALS['cache_instance'])) || (!is_object($GLOBALS['cache_instance']))) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT ext_version FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1",
                        array($ext_name), __FILE__, __LINE__);
index c960342106898a38e4290a52e95799afdc622f6d..233ae66a786fb6530dadaed980532277b196a6e9 100644 (file)
@@ -306,7 +306,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
        $GLOBALS['menu']['title'] = array();
 
        // Is there a cache instance?
-       if ((is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
+       if ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
                // Create cache name
                $cacheName = "admin_".$act."_".$wht."_".GET_LANGUAGE()."_".strtolower(get_session('admin_login'));
 
@@ -454,7 +454,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
        eval($eval);
 
        // Is there a cache instance again?
-       if ((is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
+       if ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
                // Init cache
                $GLOBALS['cache_instance']->init($cacheName);