Fix IE conditional comment
authorFomafix <fomafix@googlemail.com>
Mon, 8 Apr 2019 16:41:45 +0000 (18:41 +0200)
committerFomafix <fomafix@googlemail.com>
Mon, 8 Apr 2019 18:40:19 +0000 (20:40 +0200)
47422fabe2813fb12b7663257924fdf4cd7cd0d1 broke the IE conditional
comment. This is change restores them.

Change-Id: I397434e9c23506080fe5507b29c2cc48e2f078c7

includes/OutputPage.php
includes/resourceloader/ResourceLoaderContext.php

index cb3f1ad..b0000ab 100644 (file)
@@ -3223,7 +3223,10 @@ class OutputPage extends ContextSource {
                // Use an IE conditional comment to serve the script only to old IE
                $pieces[] = '<!--[if lt IE 9]>' .
                        ResourceLoaderClientHtml::makeLoad(
-                               ResourceLoaderContext::newDummyContext(),
+                               new ResourceLoaderContext(
+                                       $this->getResourceLoader(),
+                                       new FauxRequest( [] )
+                               ),
                                [ 'html5shiv' ],
                                ResourceLoaderModule::TYPE_SCRIPTS,
                                [ 'sync' => true ],
index f11f294..372d12d 100644 (file)
@@ -132,7 +132,6 @@ class ResourceLoaderContext implements MessageLocalizer {
         * things that don't "really" need a context.
         *
         * Use cases:
-        * - Creating html5shiv script tag in OutputPage.
         * - Unit tests (deprecated, create empty instance directly or use RLTestCase).
         *
         * @return ResourceLoaderContext