https://bugzilla.wikimedia.org/show_bug.cgi?id=38910

       Web browser: ---
             Bug #: 38910
           Summary: alt for an image with value of '0' is removed from
                    output
           Product: MediaWiki
           Version: 1.20-git
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: Unprioritized
         Component: User interface
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


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'];

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to