[fusion-trac] #629: Doubles with value 0.0 are shown as empty strings
Fusion
trac_fusion at osgeo.org
Mon Nov 17 06:28:42 PST 2014
#629: Doubles with value 0.0 are shown as empty strings
------------------------+---------------------------------------------------
Reporter: morkl | Owner: madair
Type: defect | Status: new
Priority: P2 | Milestone: Future
Component: MapGuide | Version: SVN
Severity: Major | Keywords:
External_id: | State: New
Browser: All | Os: All
------------------------+---------------------------------------------------
When selecting a feature with attributes of type double and value 0.0, the
attributes values are displayed as empty strings.
In GetPropertyValueFromFeatReader in layers/MapGuide/php/Utilities.php,
the value is set to "" if equal to null:
{{{
if ( null == $val ) {
$val = "";
}
}}}
However, the following is true/truthy in PHP:
{{{
( null == 0.0 )
}}}
The check should probably be done with the identity/type equality
operator:
{{{
if ( null === $val ) {
$val = "";
}
}}}
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/629>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list