Fix incorrect testing of CSS file index in FrontEndFileHandler

This commit is contained in:
Kijin Sung 2020-10-31 15:27:47 +09:00
parent 5bc79fc400
commit 99728527f9
2 changed files with 1 additions and 2 deletions

View file

@ -99,7 +99,7 @@ class FrontEndFileHandler extends Handler
$isCommon = preg_match(HTMLDisplayHandler::$reservedCSS, $args[0]) || preg_match(HTMLDisplayHandler::$reservedJS, $args[0]); $isCommon = preg_match(HTMLDisplayHandler::$reservedCSS, $args[0]) || preg_match(HTMLDisplayHandler::$reservedJS, $args[0]);
// Prevent overwriting common scripts. // Prevent overwriting common scripts.
if(isset($args[3]) && intval($args[3]) > -1500000000) if(!isset($args[3]) || intval($args[3]) > -1500000000)
{ {
if($isCommon) if($isCommon)
{ {

View file

@ -11,7 +11,6 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test
public function testFrontEndFileHandler() public function testFrontEndFileHandler()
{ {
$handler = new FrontEndFileHandler();
$reservedCSS = HTMLDisplayHandler::$reservedCSS; $reservedCSS = HTMLDisplayHandler::$reservedCSS;
$reservedJS = HTMLDisplayHandler::$reservedJS; $reservedJS = HTMLDisplayHandler::$reservedJS;
HTMLDisplayHandler::$reservedCSS = '/xxx$/'; HTMLDisplayHandler::$reservedCSS = '/xxx$/';