diff --git a/src/Slice/Slice.php b/src/Slice/Slice.php index ff82abd..6955915 100644 --- a/src/Slice/Slice.php +++ b/src/Slice/Slice.php @@ -37,7 +37,7 @@ protected function walk($slice) array_walk_recursive($this->storage, function (&$value) use ($slice) { - if ($value{0} === '%' && $value{strlen($value) - 1} === '%') + if (!is_object($value) && $value{0} === '%' && $value{strlen($value) - 1} === '%') { $path = substr($value, 1, -1); $value = $slice->getData($path);