Last modified: 2014-11-13 07:25:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40910, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38910 - Image alt value '0' should not be removed
Image alt value '0' should not be removed
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.20.x
All All
: Low minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, need-parsertest
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-01 08:12 UTC by Derk-Jan Hartman
Modified: 2014-11-13 07:25 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
patch - v1 (593 bytes, patch)
2012-08-29 11:44 UTC, Koosha Khajeh Moogahi [:koosha]
Details

Description Derk-Jan Hartman 2012-08-01 08:12:46 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'];
Comment 1 Koosha Khajeh Moogahi [:koosha] 2012-08-29 11:44:50 UTC
Created attachment 11035 [details]
patch - v1
Comment 2 Sumana Harihareswara 2012-08-29 11:49:18 UTC
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
Comment 3 Koosha Khajeh Moogahi [:koosha] 2012-08-29 16:59:35 UTC
https://gerrit.wikimedia.org/r/#/c/21897/
Comment 4 Sumana Harihareswara 2012-10-12 01:51:55 UTC
Comment on attachment 11035 [details]
patch - v1

This patch has been superseded by the patchset in Gerrit.
Comment 5 db [inactive,noenotif] 2013-02-10 12:11:27 UTC
(In reply to comment #3)
> https://gerrit.wikimedia.org/r/#/c/21897/

Status Abandoned
Comment 6 Gerrit Notification Bot 2014-03-05 22:31:18 UTC
Change 116483 had a related patch set uploaded by Aaron Schulz:
Resetting img alt value as "0"

https://gerrit.wikimedia.org/r/116483
Comment 7 Gerrit Notification Bot 2014-03-20 18:49:25 UTC
Change 116483 had a related patch set uploaded by Krinkle:
Resetting img alt value as '0'

https://gerrit.wikimedia.org/r/116483
Comment 8 Krinkle 2014-03-20 19:01:27 UTC
.
Comment 9 Gerrit Notification Bot 2014-11-12 23:22:21 UTC
Change 116483 merged by jenkins-bot:
MediaTransformOutput: Allow <img> alt value to be "0"

https://gerrit.wikimedia.org/r/116483

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links