From bce23c8671085e00f439f666fbf035a0c4fd7b09 Mon Sep 17 00:00:00 2001 From: ebullient Date: Tue, 17 Dec 2002 20:36:23 +0000 Subject: [PATCH] Carried over modification made to file_prefs to distinguish between a 0 value, and an unset value using ===. Certain prefs were unsaveable after the XSS changes, which cast zero values to ints (instead of strings), causing them to pass the $set_to == '' check, and thus be treated as an unset value, rather than a value of 0. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4280 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/db_prefs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/db_prefs.php b/functions/db_prefs.php index 3708441d..ef96837d 100644 --- a/functions/db_prefs.php +++ b/functions/db_prefs.php @@ -298,10 +298,10 @@ function setPref($data_dir, $username, $string, $set_to) { global $prefs_cache; if (isset($prefs_cache[$string]) && ($prefs_cache[$string] == $set_to)) { - return; + return; } - if ($set_to == '') { + if ($set_to === '') { removePref($data_dir, $username, $string); return; } -- 2.25.1