Upgrade to 3.8.0
This commit is contained in:
@@ -17,20 +17,21 @@ class NestObject extends Obj
|
||||
{
|
||||
/**
|
||||
* Converts the object to an array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ((array)$this as $key => $value) {
|
||||
if (is_a($value, 'Kirby\Cms\Field') === true) {
|
||||
if ($value instanceof Field) {
|
||||
$result[$key] = $value->value();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_object($value) === true && method_exists($value, 'toArray')) {
|
||||
if (
|
||||
is_object($value) === true &&
|
||||
method_exists($value, 'toArray')
|
||||
) {
|
||||
$result[$key] = $value->toArray();
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user