Merge "MediaTransformOutput: Allow <img> alt value to be "0""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 12 Nov 2014 23:22:17 +0000 (23:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 12 Nov 2014 23:22:17 +0000 (23:22 +0000)
includes/media/MediaTransformOutput.php

index bc9e917..d9327fb 100644 (file)
@@ -348,9 +348,9 @@ class ThumbnailImage extends MediaTransformOutput {
                        throw new MWException( __METHOD__ . ' called in the old style' );
                }
 
-               $alt = empty( $options['alt'] ) ? '' : $options['alt'];
+               $alt = isset( $options['alt'] ) ? $options['alt'] : '';
 
-               $query = empty( $options['desc-query'] ) ? '' : $options['desc-query'];
+               $query = isset( $options['desc-query'] ) ? $options['desc-query'] : '';
 
                if ( !empty( $options['custom-url-link'] ) ) {
                        $linkAttribs = array( 'href' => $options['custom-url-link'] );