diff --git a/classes/frontendfile/FrontEndFileHandler.class.php b/classes/frontendfile/FrontEndFileHandler.class.php index c2bedc121..b54b2875d 100644 --- a/classes/frontendfile/FrontEndFileHandler.class.php +++ b/classes/frontendfile/FrontEndFileHandler.class.php @@ -99,7 +99,7 @@ class FrontEndFileHandler extends Handler $isCommon = preg_match(HTMLDisplayHandler::$reservedCSS, $args[0]) || preg_match(HTMLDisplayHandler::$reservedJS, $args[0]); // Prevent overwriting common scripts. - if(isset($args[3]) && intval($args[3]) > -1500000000) + if(!isset($args[3]) || intval($args[3]) > -1500000000) { if($isCommon) { diff --git a/tests/unit/classes/FrontEndFileHandlerTest.php b/tests/unit/classes/FrontEndFileHandlerTest.php index 84f9bdf5b..ecf74b633 100644 --- a/tests/unit/classes/FrontEndFileHandlerTest.php +++ b/tests/unit/classes/FrontEndFileHandlerTest.php @@ -11,7 +11,6 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test public function testFrontEndFileHandler() { - $handler = new FrontEndFileHandler(); $reservedCSS = HTMLDisplayHandler::$reservedCSS; $reservedJS = HTMLDisplayHandler::$reservedJS; HTMLDisplayHandler::$reservedCSS = '/xxx$/';