[fusion-trac] #236: Search.php errors

Fusion trac_fusion at osgeo.org
Tue Mar 31 13:54:50 EDT 2009


#236: Search.php  errors
------------------------+---------------------------------------------------
   Reporter:  amorsell  |       Owner:  madair
       Type:  defect    |      Status:  new   
   Priority:  P2        |   Milestone:  Future
  Component:  Widgets   |     Version:  1.1.1 
   Severity:  Major     |    Keywords:        
External_id:            |       State:  New   
    Browser:  All       |          Os:  All   
------------------------+---------------------------------------------------
 This appears to still be present in 2.0b as well as older releases.  If
 the search widget encounters what it thinks is a null value, it will crash
 with an error like:

 "Value for PARCEL_NUM property is null. Exception occurred in method
 MgProxyFeatureReader.GetProperty at line 448 in file
 d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\common\mapguidecommon\Services/ProxyFeatureReader.cpp"

 To prevent this error, a change in search.php similar to
 http://trac.osgeo.org/mapguide/changeset/3318 needs to occur.
 Specifically, the Switch statement around line 170 needs to be wrapped in
 an if statment with the changed code being:

 if (!$features->IsNull($propName))
 {
              switch($propType)
                    {
                                 case MgPropertyType::Boolean:
                                     $val =
 $features->GetBoolean($propName)? "true": "false";
                                     break;
                                 case MgPropertyType::Single:
                                     $val =
 $features->GetSingle($propName);
                                     break;
                                 case MgPropertyType::Double:
                                     $val =
 $features->GetDouble($propName);
                                     break;
                                 case MgPropertyType::Int16:
                                     $val = $features->GetInt16($propName);
                                     break;
                                 case MgPropertyType::Int32:
                                     $val = $features->GetInt32($propName);
                                     break;
                                 case MgPropertyType::Int64:
                                     $val = $features->GetInt64($propName);
                                     break;
                                 case MgPropertyType::String:
                                     $val =
 $features->GetString($propName);
                                     break;
                             }
                                         }

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/236>
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