|
@@ 826-831 (lines=6) @@
|
| 823 |
|
} |
| 824 |
|
$value = array($value); |
| 825 |
|
} // field already exist and has single value |
| 826 |
|
elseif (!is_array($oldValue)) { |
| 827 |
|
$value = array_merge((array) $oldValue, array($value)); |
| 828 |
|
if ($this->getId()) { |
| 829 |
|
$this->operator->set($fieldName, $value); |
| 830 |
|
} |
| 831 |
|
} // field exists and is array |
| 832 |
|
else { |
| 833 |
|
if ($this->getId()) { |
| 834 |
|
// check if array because previous $set operation on single value was executed |
|
@@ 866-869 (lines=4) @@
|
| 863 |
|
if ($this->getId()) { |
| 864 |
|
if (!$oldValue) { |
| 865 |
|
$this->operator->pushEach($fieldName, $values); |
| 866 |
|
} elseif (!is_array($oldValue)) { |
| 867 |
|
$values = array_merge((array) $oldValue, $values); |
| 868 |
|
$this->operator->set($fieldName, $values); |
| 869 |
|
} else { |
| 870 |
|
$this->operator->pushEach($fieldName, $values); |
| 871 |
|
$values = array_merge($oldValue, $values); |
| 872 |
|
} |