X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FBitmapMetadataHandler.php;h=9617692ab47bf52aa8bf942f92ac772baef7f3dc;hb=78e0fc3a70f5d917bc526f1c6ede4d455f46cb47;hp=c0dfa3a074d469059dc04d4ca9725f12477a7b0a;hpb=8c96aec32cffaab96b2bd9dca206a99a13640545;p=lhc%2Fweb%2Fwiklou.git 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] ); } }