Opened 10 years ago

Closed 9 years ago

#629 closed defect (fixed)

Doubles with value 0.0 are shown as empty strings

Reported by: morkl Owned by: madair
Priority: P2 Milestone: Future
Component: MapGuide Version: SVN
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New


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 = "";

Attachments (1)

629.patch (368 bytes ) - added by morkl 10 years ago.

Download all attachments as: .zip

Change History (2)

by morkl, 10 years ago

Attachment: 629.patch added


comment:1 by jng, 9 years ago

Resolution: fixed
Status: newclosed

Fixed trunk (r2882) and 2.6 (r2883). Thanks for the patch.

Note: See TracTickets for help on using tickets.