Last modified: 2014-11-13 07:25:42 UTC
Two cases: [[File:example.svg|20px|1]] [[File:example.svg|20px|0]] The first has an alt value of '1' when rendered, the seconds a value of ''. This is likely due to the use of php's empty() http://php.net/manual/en/function.empty.php which treats '0' as an empty value. Our use of empty() is in includes/media/MediaTransformOutput.php: $alt = empty( $options['alt'] ) ? '' : $options['alt'];
Created attachment 11035 [details] patch - v1
Thanks for the patch! It would be easier to review it if you put it directly in our source control system: https://www.mediawiki.org/wiki/Git/Tutorial
https://gerrit.wikimedia.org/r/#/c/21897/
Comment on attachment 11035 [details] patch - v1 This patch has been superseded by the patchset in Gerrit.
(In reply to comment #3) > https://gerrit.wikimedia.org/r/#/c/21897/ Status Abandoned
Change 116483 had a related patch set uploaded by Aaron Schulz: Resetting img alt value as "0" https://gerrit.wikimedia.org/r/116483
Change 116483 had a related patch set uploaded by Krinkle: Resetting img alt value as '0' https://gerrit.wikimedia.org/r/116483
.
Change 116483 merged by jenkins-bot: MediaTransformOutput: Allow <img> alt value to be "0" https://gerrit.wikimedia.org/r/116483