From 305f13c2956442f2ace6d622983a663e342edc99 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Fri, 4 Jan 2002 08:41:24 +0000 Subject: [PATCH] The prefs caching in PHP 4.1 still doesn't work. While we don't find a correct fix for this we exclude 4.1 from caching prefs. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2084 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/prefs.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/prefs.php b/functions/prefs.php index 65a32de0..f6606827 100644 --- a/functions/prefs.php +++ b/functions/prefs.php @@ -15,7 +15,8 @@ global $prefs_are_cached, $prefs_cache; if ( !session_is_registered('prefs_are_cached') || !isset( $prefs_cache) || - !is_array( $prefs_cache) ) { + !is_array( $prefs_cache) || + substr( phpversion(), 0, 3 ) == '4.1' ) { $prefs_are_cached = false; $prefs_cache = array(); } @@ -68,8 +69,9 @@ function cachePrefValues($data_dir, $username) { } fclose($file); + $prefs_are_cached = true; + session_register('prefs_cache'); - $prefs_are_cached = true; session_register('prefs_are_cached'); } -- 2.25.1