Page MenuHomePhabricator

XmlFunctions.wfElement() incorrectly checks $contents for emptiness (with Fix)
Closed, ResolvedPublic

Description

In the function wfElement( $element, $attribs = null, $contents = '') in
includes/XmlFunctions.php incorrectly checks if the content is empty:

if( $contents == '' ) {

It should be ===, otherwise when $content is integer 0, that line gives a false
positive.


Version: 1.7.x
Severity: normal

Details

Reference
bz5646

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:12 PM
bzimport set Reference to bz5646.
bzimport added a subscriber: Unknown Object (MLST).