Skip to content

Commit

Permalink
#21 allow null value as name in snippets
Browse files Browse the repository at this point in the history
fix PHP 8.1 deprection warning
  • Loading branch information
lukasleitsch committed Jul 31, 2022
1 parent 4db7494 commit 76a2cc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Snippet.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function load(): string
}
}

if (str_ends_with($file, Template::EXTENSION_BLADE)) {
if (str_ends_with($file ?? '', Template::EXTENSION_BLADE)) {
// blade snippet
return View::file($file, $this->data)->render();
}
Expand Down

0 comments on commit 76a2cc0

Please sign in to comment.