From 1a257876998a9066241264ffeeaa579cea3abee6 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sat, 6 Sep 2014 22:42:02 +0100 Subject: [PATCH] When getting remote config, if the caller requested a single setting without an array, always do that Even if it comes from the cache. See Idfec62d5 review comments for PS43. Change-Id: I67ceef7fec61b7f37728f120354bd886018d244e --- includes/SiteConfiguration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index b877544099..8c1f26b82a 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -532,7 +532,7 @@ class SiteConfiguration { if ( isset( $this->cfgCache[$wiki] ) ) { $res = array_intersect_key( $this->cfgCache[$wiki], array_flip( $settings ) ); if ( count( $res ) == count( $settings ) ) { - return $res; // cache hit + return $multi ? $res : current( $res ); // cache hit } } elseif ( !in_array( $wiki, $this->wikis ) ) { throw new MWException( "No such wiki '$wiki'." ); -- 2.20.1