Merge "Fix IE conditional comment"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 8 Apr 2019 19:36:51 +0000 (19:36 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 8 Apr 2019 19:36:51 +0000 (19:36 +0000)
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