From 8eb63bb676660525dd27c6b9b50f0a9b4ac96a82 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 27 Feb 2008 17:15:02 +0000 Subject: [PATCH] Avoid PHP errors when adding to empty list git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12972 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/options.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions/options.php b/functions/options.php index 78e0bea0..872b398f 100644 --- a/functions/options.php +++ b/functions/options.php @@ -647,6 +647,8 @@ function save_option($option) { // if ($option->type == SMOPT_TYPE_EDIT_LIST) { + if (empty($option->possible_values)) $option->possible_values = array(); + // add element if given // if (sqGetGlobalVar('add_' . $option->name, $new_element, SQ_POST)) { -- 2.25.1