From: Umherirrender Date: Thu, 28 Feb 2019 20:06:53 +0000 (+0100) Subject: Fix is_array check in ResourceLoaderImageModule X-Git-Tag: 1.34.0-rc.0~2696^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=fb52474137a5456b656e23f5ee21adea2690fc29;p=lhc%2Fweb%2Fwiklou.git Fix is_array check in ResourceLoaderImageModule Checking the variable used as expression in the foreach seems wrong. Also the var is already checked before, so this is the wrong var name Change-Id: Ia2a7352422ace1e78949a2009b0ad1f16681fc74 --- diff --git a/includes/resourceloader/ResourceLoaderImageModule.php b/includes/resourceloader/ResourceLoaderImageModule.php index c555eb8849..d06e8ac4c7 100644 --- a/includes/resourceloader/ResourceLoaderImageModule.php +++ b/includes/resourceloader/ResourceLoaderImageModule.php @@ -184,9 +184,9 @@ class ResourceLoaderImageModule extends ResourceLoaderModule { $option = [ 'default' => $option ]; } foreach ( $option as $skin => $data ) { - if ( !is_array( $option ) ) { + if ( !is_array( $data ) ) { throw new InvalidArgumentException( - "Invalid list error. '$option' given, array expected." + "Invalid list error. '$data' given, array expected." ); } }