X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fmedia%2FBitmapMetadataHandler.php;h=9617692ab47bf52aa8bf942f92ac772baef7f3dc;hp=c0dfa3a074d469059dc04d4ca9725f12477a7b0a;hb=a38af7ba26579bb3004f673e44d39710887763aa;hpb=21fb9bb32b82f13a436238a7dca9bac1464baf80 diff --git a/includes/media/BitmapMetadataHandler.php b/includes/media/BitmapMetadataHandler.php index c0dfa3a074..9617692ab4 100644 --- a/includes/media/BitmapMetadataHandler.php +++ b/includes/media/BitmapMetadataHandler.php @@ -123,7 +123,7 @@ class BitmapMetadataHandler { */ function getMetadataArray() { // this seems a bit ugly... This is all so its merged in right order - // based on the MWG recomendation. + // based on the MWG recommendation. $temp = []; krsort( $this->metaPriority ); foreach ( $this->metaPriority as $pri ) { @@ -132,13 +132,13 @@ class BitmapMetadataHandler { // Do some special casing for multilingual values. // Don't discard translations if also as a simple value. foreach ( $this->metadata[$type] as $itemName => $item ) { - if ( is_array( $item ) && isset( $item['_type'] ) && $item['_type'] === 'lang' ) { - if ( isset( $temp[$itemName] ) && !is_array( $temp[$itemName] ) ) { - $default = $temp[$itemName]; - $temp[$itemName] = $item; - $temp[$itemName]['x-default'] = $default; - unset( $this->metadata[$type][$itemName] ); - } + if ( is_array( $item ) && isset( $item['_type'] ) && $item['_type'] === 'lang' && + isset( $temp[$itemName] ) && !is_array( $temp[$itemName] ) + ) { + $default = $temp[$itemName]; + $temp[$itemName] = $item; + $temp[$itemName]['x-default'] = $default; + unset( $this->metadata[$type][$itemName] ); } }