@@ -580,8 +580,8 @@ function helper($filenames): void
580
580
foreach ($ filenames as $ filename ) {
581
581
// Store our system and application helper
582
582
// versions so that we can control the load ordering.
583
- $ systemHelper = null ;
584
- $ appHelper = null ;
583
+ $ systemHelper = '' ;
584
+ $ appHelper = '' ;
585
585
$ localIncludes = [];
586
586
587
587
if (! str_contains ($ filename , '_helper ' )) {
@@ -598,7 +598,7 @@ function helper($filenames): void
598
598
if (str_contains ($ filename , '\\' )) {
599
599
$ path = $ loader ->locateFile ($ filename , 'Helpers ' );
600
600
601
- if (empty ( $ path) ) {
601
+ if ($ path !== '' ) {
602
602
throw FileNotFoundException::forFileNotFound ($ filename );
603
603
}
604
604
@@ -620,7 +620,7 @@ function helper($filenames): void
620
620
}
621
621
622
622
// App-level helpers should override all others
623
- if (! empty ( $ appHelper) ) {
623
+ if ($ appHelper !== '' ) {
624
624
$ includes [] = $ appHelper ;
625
625
$ loaded [] = $ filename ;
626
626
}
@@ -629,7 +629,7 @@ function helper($filenames): void
629
629
$ includes = [...$ includes , ...$ localIncludes ];
630
630
631
631
// And the system default one should be added in last.
632
- if (! empty ( $ systemHelper) ) {
632
+ if ($ systemHelper !== '' ) {
633
633
$ includes [] = $ systemHelper ;
634
634
$ loaded [] = $ filename ;
635
635
}
@@ -1092,7 +1092,7 @@ function stringify_attributes($attributes, bool $js = false): string
1092
1092
{
1093
1093
$ atts = '' ;
1094
1094
1095
- if (empty ( $ attributes) ) {
1095
+ if ($ attributes === '' || $ attributes === [] || $ attributes === null ) {
1096
1096
return $ atts ;
1097
1097
}
1098
1098
0 commit comments