Skip to content

Commit 76a2cc0

Browse files
committed
#21 allow null value as name in snippets
fix PHP 8.1 deprection warning
1 parent 4db7494 commit 76a2cc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Snippet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function load(): string
2626
}
2727
}
2828

29-
if (str_ends_with($file, Template::EXTENSION_BLADE)) {
29+
if (str_ends_with($file ?? '', Template::EXTENSION_BLADE)) {
3030
// blade snippet
3131
return View::file($file, $this->data)->render();
3232
}

0 commit comments

Comments
 (0)