Commit c349f2b8 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1851589: only load block js files if the string is not empty



behatnotneeded

Change-Id: I1a954fa83196fd68758ef08e16433ca7dd5b974c
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit c658ae93)
parent ee7f17d5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2098,7 +2098,7 @@ class BlockInstance {
        $js = '';
        foreach ($jsfiles as $jsfile) {

            $file = (is_array($jsfile) && isset($jsfile['file'])) ? $jsfile['file'] : $jsfile;
            $file = (is_array($jsfile) && !empty($jsfile['file'])) ? $jsfile['file'] : $jsfile;

            if (stripos($file, 'http://') === false && stripos($file, 'https://') === false) {
                $file = 'blocktype/' . $this->blocktype . '/' . $file;