]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load_cache-modules.php
Several fixes/improvements, new function introduced:
[mailer.git] / inc / loader / load_cache-modules.php
index 052d9937dd1957e5f29d9a445188a76e2bda9c64..4875790656a818ecccab8dba563d46125b53159b 100644 (file)
@@ -52,6 +52,14 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i
 
        // Rewrite module cache
        $modArray = $GLOBALS['cache_array']['modules'];
+
+       // Do only process valid arrays
+       if (!isset($modArray['module'])) {
+               // We should fix this!
+               debug_report_bug('modArray=<pre>'.print_r($modArray, true).'</pre>');
+       } // END - if
+
+       // Rewrite some parts
        foreach ($modArray['module'] as $key => $mod) {
                // Add all
                foreach (array('id','title','locked','hidden','admin_only','mem_only','has_menu') as $entry) {
@@ -64,7 +72,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i
                                unset($GLOBALS['cache_array']['modules'][$entry][$key]);
                        } else {
                                // Log this for debug purposes
-                               debugLogMessage('[' . basename(__FILE__) . ':' . __LINE__ . '] Entry not found. module=' . $mod . ',key=' . $key . ',entry=' . $entry);
+                               logDebugMessage(basename(__FILE__), __LINE__, 'Entry not found. module=' . $mod . ',key=' . $key . ',entry=' . $entry);
                        }
                } // END - foreach
        } // END - foreach