We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 707ab84 + 12471b1 commit f5c2caeCopy full SHA for f5c2cae
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