We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66a6843 commit 12471b1Copy full SHA for 12471b1
src/Controller/Component/ApiPaginationComponent.php
@@ -59,8 +59,11 @@ public function beforeRender(Event $event)
59
60
$subject->set($config['key'], $this->pagingInfo);
61
$data = $subject->viewBuilder()->getOption('serialize') ?? [];
62
- $data[] = $config['key'];
63
- $subject->viewBuilder()->setOption('serialize', $data);
+
+ if (is_array($data)) {
64
+ $data[] = $config['key'];
65
+ $subject->viewBuilder()->setOption('serialize', $data);
66
+ }
67
}
68
69
/**
0 commit comments