Fix is_array check in ResourceLoaderImageModule
authorUmherirrender <umherirrender_de.wp@web.de>
Thu, 28 Feb 2019 20:06:53 +0000 (21:06 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Thu, 28 Feb 2019 20:06:53 +0000 (21:06 +0100)
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

includes/resourceloader/ResourceLoaderImageModule.php

index c555eb8..d06e8ac 100644 (file)
@@ -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."
                                                        );
                                                }
                                        }