From 558e9637359b6be8238e33c21cce748d1b80bfc9 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Thu, 23 Feb 2012 02:45:45 +0000 Subject: [PATCH] Bug 34604 - [mw.config] wgActionPaths should be an object instead of a numeral array JavaScript --- RELEASE-NOTES-1.19 | 2 ++ includes/resourceloader/ResourceLoaderStartUpModule.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 0cecef8003..214e2ee3d4 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -245,6 +245,8 @@ production. around a bug where not all styles were applied in Internet Explorer * (bug 28936, bug 5280) Broken or invalid titles can't be removed from watchlist. * (bug 34600) Older skins using useHeadElement=false were broken in 1.18 +* (bug 34604) [mw.config] wgActionPaths should be an object instead of a numeral + array. === API changes in 1.19 === * Made action=edit less likely to return "unknownerror", by returning the actual error diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 8f53ee20f6..5dbce4394b 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -68,7 +68,9 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { 'wgScriptExtension' => $wgScriptExtension, 'wgScript' => $wgScript, 'wgVariantArticlePath' => $wgVariantArticlePath, - 'wgActionPaths' => $wgActionPaths, + // Force object to avoid "empty" associative array from + // becoming [] instead of {} in JS (bug 34604) + 'wgActionPaths' => (object)$wgActionPaths, 'wgServer' => $wgServer, 'wgUserLanguage' => $context->getLanguage(), 'wgContentLanguage' => $wgContLang->getCode(), -- 2.20.1