@@ -719,8 +719,8 @@ public function getAssets($type = null, $relativeTo = self::RELATIVE_PATH)
719
719
}
720
720
721
721
foreach ($ additionalAssets as $ assets ) {
722
- $ basePath = isset ($ assets ['base_path ' ]) ? $ assets ['base_path ' ] : null ;
723
- $ baseUrl = isset ($ assets ['base_url ' ]) ? $ assets ['base_url ' ] : null ;
722
+ $ basePath = isset ($ assets ['base_path ' ]) ? $ assets ['base_path ' ] : '' ;
723
+ $ baseUrl = isset ($ assets ['base_url ' ]) ? $ assets ['base_url ' ] : '' ;
724
724
$ root = $ this ->getRelativeRoot ($ relativeTo ,
725
725
$ this ->makeUriRelativeTo ($ basePath , $ this ->basePath ),
726
726
$ this ->makeUriRelativeTo ($ baseUrl , $ this ->baseUrl ));
@@ -746,7 +746,7 @@ public function getAssets($type = null, $relativeTo = self::RELATIVE_PATH)
746
746
$ cssFiles = array_unique ($ cssFiles );
747
747
$ jsFiles = array_unique ($ jsFiles );
748
748
749
- return $ this ->filterAssetArray (array ($ cssFiles , $ jsFiles , $ inlineCss , $ inlineJs , $ inlineHead ), $ type );
749
+ return $ this ->filterAssetArray (array ($ cssFiles , $ jsFiles , $ inlineCss , $ inlineJs , $ inlineHead ), $ type ?? '' );
750
750
}
751
751
752
752
/**
@@ -802,7 +802,7 @@ protected function makeUriRelativeTo($uri, $root)
802
802
* @param string $type 'css', 'js', 'inline_css', 'inline_js', 'inline_head', or null for all
803
803
* @return array
804
804
*/
805
- protected function filterAssetArray ($ array , $ type = null )
805
+ protected function filterAssetArray ($ array , $ type = '' )
806
806
{
807
807
$ types = array ('css ' , 'js ' , 'inline_css ' , 'inline_js ' , 'inline_head ' );
808
808
$ typeIndex = array_search (strtolower ($ type ), $ types );
0 commit comments