Fix Illegal string offset 'ltr' in ResourceLoaderEchoImageModule.php

Make $paths an array.

@Krinkle came up with this fix. I just uploaded the patch.

Bug: T161420
Change-Id: I709808bfb0e620f7808175dc272fd57e88b663f5
This commit is contained in:
Paladox 2017-03-27 23:29:48 +00:00
parent 7749ac4684
commit ecae781538

View file

@ -37,9 +37,9 @@ class ResourceLoaderEchoImageModule extends ResourceLoaderImageModule {
foreach ( $this->definition['icons'] as $iconName => $definition ) {
// FIXME: We also have a 'site' icon which is "magical"
// and uses witchcraft and should be handled specifically
$paths = '';
if ( isset( $definition[ 'path' ] ) ) {
if ( is_array( $definition[ 'path' ] ) ) {
$paths = [];
foreach ( $definition[ 'path' ] as $dir => $p ) {
// Has both rtl and ltr definitions
$paths[ $dir ] = $p;