From: Trevor Parscal Date: Tue, 19 Oct 2010 22:53:53 +0000 (+0000) Subject: Fixed case where tryForKey can sometimes not return an array X-Git-Tag: 1.31.0-rc.0~34412 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=4f09b0fa47861f5caa22381edfeba700a7e0607b;p=lhc%2Fweb%2Fwiklou.git Fixed case where tryForKey can sometimes not return an array --- diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index b247254f21..bcf750de86 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -317,9 +317,9 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { */ protected static function tryForKey( $list, $key, $fallback = null ) { if ( isset( $list[$key] ) && is_array( $list[$key] ) ) { - return $list[$key]; + return (array) $list[$key]; } else if ( is_string( $fallback ) && isset( $list[$fallback] ) ) { - return $list[$fallback]; + return (array) $list[$fallback]; } return array(); }