@@ 926-931 (lines=6) @@ | ||
923 | } |
|
924 | $value = array($value); |
|
925 | } // field already exist and has single value |
|
926 | elseif (!is_array($oldValue)) { |
|
927 | $value = array_merge((array) $oldValue, array($value)); |
|
928 | if ($this->getId()) { |
|
929 | $this->operator->set($fieldName, $value); |
|
930 | } |
|
931 | } // field exists and is array |
|
932 | else { |
|
933 | if ($this->getId()) { |
|
934 | $setValue = $this->operator->get('$set', $fieldName); |
|
@@ 965-968 (lines=4) @@ | ||
962 | if ($this->getId()) { |
|
963 | if (!$oldValue) { |
|
964 | $this->operator->pushEach($fieldName, $values); |
|
965 | } elseif (!is_array($oldValue)) { |
|
966 | $values = array_merge((array) $oldValue, $values); |
|
967 | $this->operator->set($fieldName, $values); |
|
968 | } else { |
|
969 | $this->operator->pushEach($fieldName, $values); |
|
970 | $values = array_merge($oldValue, $values); |
|
971 | } |