Closed wdebusschere closed 2 years ago
In PHP 8.1 when null is passed to build in function, it is no longer silently converted to empty string. null migration deprecated php-8.1
See: https://github.com/lukasleitsch/kirby-blade/blob/4db7494ffd63ebcfaa34f6c3713db1a444a162b1/src/Snippet.php#L29 if (str_ends_with($file, Template::EXTENSION_BLADE)) {
if (str_ends_with($file, Template::EXTENSION_BLADE)) {
Solution if (str_ends_with($file ?? '', Template::EXTENSION_BLADE)) {
if (str_ends_with($file ?? '', Template::EXTENSION_BLADE)) {
I think this is a good solution. Many people depend on null snippets.
Thanks. Fixed.
In PHP 8.1 when null is passed to build in function, it is no longer silently converted to empty string. null migration deprecated php-8.1
See: https://github.com/lukasleitsch/kirby-blade/blob/4db7494ffd63ebcfaa34f6c3713db1a444a162b1/src/Snippet.php#L29
if (str_ends_with($file, Template::EXTENSION_BLADE)) {
Solution
if (str_ends_with($file ?? '', Template::EXTENSION_BLADE)) {