diff --git a/src/values/akey.php b/src/values/akey.php index 27518a7..ff2f741 100644 --- a/src/values/akey.php +++ b/src/values/akey.php @@ -73,11 +73,11 @@ class akey { static final function merge(&$array, $key, $merge): void { if ($array instanceof ArrayAccess) { $value = $array->offsetGet($key); - cl::merge($value, $merge); + $value = cl::merge($value, $merge); $array->offsetSet($key, $value); } else { cl::ensure_array($array); - cl::merge($array[$key], $merge); + $array[$key] = cl::merge($array[$key], $merge); } } diff --git a/src/values/mprop.php b/src/values/mprop.php index 09e9d4d..25b92ab 100644 --- a/src/values/mprop.php +++ b/src/values/mprop.php @@ -107,7 +107,7 @@ class mprop { */ static final function merge(object $object, string $property, $array): void { $values = cl::with(self::get($object, $property)); - cl::merge($values, cl::with($array)); + $values = cl::merge($values, cl::with($array)); self::set($object, $property, $values); } diff --git a/src/values/oprop.php b/src/values/oprop.php index 089f4c5..fa162f3 100644 --- a/src/values/oprop.php +++ b/src/values/oprop.php @@ -113,7 +113,7 @@ class oprop { $p = $c->getProperty($property); $p->setAccessible(true); $values = cl::with($p->getValue($object)); - cl::merge($values, cl::with($array)); + $values = cl::merge($values, cl::with($array)); $p->setValue($object, $values); } catch (ReflectionException $e) { if (property_exists($object, $property)) { @@ -121,7 +121,7 @@ class oprop { } else { $values = []; } - cl::merge($values, cl::with($array)); + $values = cl::merge($values, cl::with($array)); $object->$property = $values; } }