This is a temporary workaround to fix the php 4.1 problem in saving
[squirrelmail.git] / functions / prefs.php
index d14d46a13d15775c0346d4e38defd14640060131..b4b2d9db9366cf6de851a4a98b83ec17c6960c3e 100644 (file)
  */
 
 global $prefs_are_cached, $prefs_cache;
-if (!session_is_registered('prefs_are_cached')) {
+
+if ( !session_is_registered('prefs_are_cached') ||
+     !isset( $prefs_cache) ||
+     !is_array( prefs_cache) ) {
     $prefs_are_cached = false;
     $prefs_cache = array();
 }