Opened 17 years ago

Closed 17 years ago

#2268 closed defect (fixed)

KEYIMAGE bug in MapScript/PHP

Reported by: ddunne Owned by: dmorissette
Priority: normal Milestone: 5.0 release
Component: MapScript-PHP Version: 5.0
Severity: normal Keywords:
Cc:

Description

Found a bug in MapScript/PHP regarding the use of KEYIMAGE. 

Problem:
I set KEYIMAGE properly in a Mapfile. I use MapScript/PHP to read this Mapfile. 

However, accessing "ClassObj->keyimage" returns empty string. 
Instead "ClassObj->template" returns the expected KEYIMAGE result.



Solution:
Problem is in php_mapscript.c where "keyimage" is incorrectly mapped to "pclass->template". 
When I recompile with "keyimage" mappped to "pclass->keyimage" the problem is fixed.

diff php_mapscript.c.ORI php_mapscript.c
8764c8764
<     PHPMS_ADD_PROP_STR(return_value,  "keyimage",   pclass->template);
---
>     PHPMS_ADD_PROP_STR(return_value,  "keyimage",   pclass->keyimage);


Build:
mapserver 5.0.0 beta 5 (compiled on Linux)

Change History (2)

comment:1 by dmorissette, 17 years ago

Milestone: 5.0 release
Owner: changed from mapserverbugs to dmorissette

Checking...

comment:2 by dmorissette, 17 years ago

Resolution: fixed
Status: newclosed

Thanks for the report. Fixed in r6719.

Note: See TracTickets for help on using tickets.