浏览代码

Guarantee we have an array

pdontthink 17 年之前
父节点
当前提交
c6a088760f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      functions/options.php

+ 1 - 0
functions/options.php

@@ -648,6 +648,7 @@ function save_option($option) {
     if ($option->type == SMOPT_TYPE_EDIT_LIST) {
 
         if (empty($option->possible_values)) $option->possible_values = array();
+        if (!is_array($option->possible_values)) $option->possible_values = array($option->possible_values);
 
         // add element if given
         //