From 1308ae723c7d3cd9532eb0f64e05e4c260b5df92 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Thu, 13 Apr 2023 05:56:39 +0000 Subject: [PATCH] Don't str_replace() on null values git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14990 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/options.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/options.php b/functions/options.php index 249ce66f..ceabee3d 100644 --- a/functions/options.php +++ b/functions/options.php @@ -1006,7 +1006,7 @@ function save_option($option) { // all other widgets except TEXTAREAs should never be allowed to have newlines // - else if ($option->type != SMOPT_TYPE_TEXTAREA) + else if ($option->type != SMOPT_TYPE_TEXTAREA && !empty($option->new_value)) $option->new_value = str_replace(array("\r", "\n"), '', $option->new_value); -- 2.25.1