jenkins-bot has submitted this change and it was merged.
Change subject: MediaTransformOutput: Allow <img> alt value to be "0"
......................................................................
MediaTransformOutput: Allow <img> alt value to be "0"
Due to use of empty(), the alt and query value was stripped and
replaced with an empty string if the input was "0".
Bug: 38910
Change-Id: I1aef143fc45eb1357e200ad2fcb488dc4876ffbd
---
M includes/media/MediaTransformOutput.php
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Krinkle: Looks good to me, but someone else must approve
TheDJ: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/media/MediaTransformOutput.php
b/includes/media/MediaTransformOutput.php
index bc9e917..d9327fb 100644
--- a/includes/media/MediaTransformOutput.php
+++ b/includes/media/MediaTransformOutput.php
@@ -348,9 +348,9 @@
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'] );
--
To view, visit https://gerrit.wikimedia.org/r/116483
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1aef143fc45eb1357e200ad2fcb488dc4876ffbd
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Lekshmi <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Koosha <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits