@@ -580,8 +580,8 @@ function helper($filenames): void
580580 foreach ($ filenames as $ filename ) {
581581 // Store our system and application helper
582582 // versions so that we can control the load ordering.
583- $ systemHelper = null ;
584- $ appHelper = null ;
583+ $ systemHelper = '' ;
584+ $ appHelper = '' ;
585585 $ localIncludes = [];
586586
587587 if (! str_contains ($ filename , '_helper ' )) {
@@ -598,7 +598,7 @@ function helper($filenames): void
598598 if (str_contains ($ filename , '\\' )) {
599599 $ path = $ loader ->locateFile ($ filename , 'Helpers ' );
600600
601- if (empty ( $ path) ) {
601+ if ($ path !== '' ) {
602602 throw FileNotFoundException::forFileNotFound ($ filename );
603603 }
604604
@@ -620,7 +620,7 @@ function helper($filenames): void
620620 }
621621
622622 // App-level helpers should override all others
623- if (! empty ( $ appHelper) ) {
623+ if ($ appHelper !== '' ) {
624624 $ includes [] = $ appHelper ;
625625 $ loaded [] = $ filename ;
626626 }
@@ -629,7 +629,7 @@ function helper($filenames): void
629629 $ includes = [...$ includes , ...$ localIncludes ];
630630
631631 // And the system default one should be added in last.
632- if (! empty ( $ systemHelper) ) {
632+ if ($ systemHelper !== '' ) {
633633 $ includes [] = $ systemHelper ;
634634 $ loaded [] = $ filename ;
635635 }
@@ -1092,7 +1092,7 @@ function stringify_attributes($attributes, bool $js = false): string
10921092 {
10931093 $ atts = '' ;
10941094
1095- if (empty ( $ attributes) ) {
1095+ if ($ attributes === '' || $ attributes === [] || $ attributes === null ) {
10961096 return $ atts ;
10971097 }
10981098
0 commit comments