Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Fix - PHP8.1 deprecation warning (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
John Zwarthoed authored Jun 17, 2022
1 parent 91ac9a3 commit 82cb2b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/Inertia.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function render($component, $props = [], $viewData = [], $context = []):
$request = $this->requestStack->getCurrentRequest();
$url = $request->getRequestUri();

$only = array_filter(explode(',', $request->headers->get('X-Inertia-Partial-Data')));
$only = array_filter(explode(',', $request->headers->get('X-Inertia-Partial-Data') ?? ''));
$props = ($only && $request->headers->get('X-Inertia-Partial-Component') === $component)
? self::array_only($props, $only) : $props;

Expand Down

0 comments on commit 82cb2b4

Please sign in to comment.