This is a temporary workaround to fix the php 4.1 problem in saving
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Dec 2001 13:35:47 +0000 (13:35 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Dec 2001 13:35:47 +0000 (13:35 +0000)
prefs. The real problem is that the prefs array doesn't makes its way
into the registration process in php 4.1, don't know yet why.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1959 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/prefs.php

index d14d46a13d15775c0346d4e38defd14640060131..b4b2d9db9366cf6de851a4a98b83ec17c6960c3e 100644 (file)
  */
 
 global $prefs_are_cached, $prefs_cache;
  */
 
 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();
 }
     $prefs_are_cached = false;
     $prefs_cache = array();
 }