diff --git a/elements/ContentPanorama.php b/elements/ContentPanorama.php index a460592..531617f 100644 --- a/elements/ContentPanorama.php +++ b/elements/ContentPanorama.php @@ -57,11 +57,11 @@ protected function compile() { $this->Template->showCompass = $this->panorama_compass; // add javascripts and stylesheet to head - if( array_search('system/modules/ce_panorama/assets/libpannellum.js',$GLOBALS['TL_JAVASCRIPT']) === FALSE ) { + if( !is_array($GLOBALS['TL_JAVASCRIPT']) || array_search('system/modules/ce_panorama/assets/libpannellum.js',$GLOBALS['TL_JAVASCRIPT']) === FALSE ) { $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ce_panorama/assets/libpannellum.js'; } - if( array_search('system/modules/ce_panorama/assets/pannellum.js',$GLOBALS['TL_JAVASCRIPT']) === FALSE ) { + if( !is_array($GLOBALS['TL_JAVASCRIPT']) || array_search('system/modules/ce_panorama/assets/pannellum.js',$GLOBALS['TL_JAVASCRIPT']) === FALSE ) { $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ce_panorama/assets/pannellum.js'; }