From cd8e4943c1dac9c71b6a8fe56627f8ac61ec6297 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Sat, 20 Mar 2010 22:51:06 +0000
Subject: [PATCH] Sanity-check added because of debug mail reported missing
 array element 'module'

---
 inc/loader/load_cache-modules.php | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/inc/loader/load_cache-modules.php b/inc/loader/load_cache-modules.php
index c0caef79c5..4875790656 100644
--- a/inc/loader/load_cache-modules.php
+++ b/inc/loader/load_cache-modules.php
@@ -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) {
-- 
2.39.5