Fixes for cache/theme
[mailer.git] / inc / extensions / ext-sql_patches.php
index 92b8b05ed591d3391497f9017b5c923c263becb0..e350aca173be2fa041b3802e9423842516c83301 100644 (file)
@@ -716,10 +716,14 @@ default: // Do stuff when extension is loaded
 
                // Read key from secret file
                if ((getConfig('file_hash') == "") || (getConfig('master_salt') == "") || (getConfig('pass_scramble') == "")) {
+                       // Cache instance
+                       global $cacheInstance;
+
                        // Maybe need setup of secret key!
                        require_once(PATH."inc/gen_sql_patches.php");
 
-                       if ((GET_EXT_VERSION("cache") >= "0.1.2") && (is_object($cacheInstance))) {
+                       // @TODO Rewrite this to a filter!
+                       if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($cacheInstance)) && (is_object($cacheInstance))) {
                                // Remove extensions and mod_reg cache file
                                require_once(PATH."inc/libs/cache_functions.php");
                                require_once(PATH."inc/extensions/ext-cache.php");