gruffen commited on 2011-05-06 04:43:54
Showing 2 changed files, with 2 additions and 2 deletions.
... | ... |
@@ -942,11 +942,11 @@ function shd_validate_custom_fields($scope, $dept) |
942 | 942 |
break; |
943 | 943 |
case CFIELD_TYPE_MULTI: |
944 | 944 |
$newvalue = array(); |
945 |
- if (!is_array($value)) |
|
945 |
+ if (empty($_POST['field-' . $field_id]) || !is_array($_POST['field-' . $field_id])) |
|
946 | 946 |
$value = 0; |
947 | 947 |
else |
948 | 948 |
{ |
949 |
- foreach ($value as $item) |
|
949 |
+ foreach ($_POST['field-' . $field_id] as $item) |
|
950 | 950 |
{ |
951 | 951 |
if (!empty($item) && is_numeric($item) && isset($field['options'][(int) $item])) |
952 | 952 |
$newvalue[] = $item; |
953 | 953 |