Ticket #323 (closed defect: fixed)
[PHP MapScript] Problem with class parameters always assigned by reference
|Reported by:||dmorissette||Owned by:||dmorissette|
(This problem comes from CWC bug 2030) When drawing the scalebar (for instance), the output is forced to PNG, before drawing the scalebar php code save the old image type, set it to PNG the draw the scalebar. After all theese steps, the old image type is restored. the code looks like this: $szOldImgType = $map->outputformat->name; $map->selectOutputFormat("PNG"); $map->drawScaleBar(); $map->selectOutputFormat($szOldImgType); The previous code won't work unless the first line is: $szOldImgType = $map->outputformat->name.""; I just saw that a lots of mapobject (probably others) attributes are not copied when using the "=" operator, but referenced. Is there anything we can do to prevent PHP MapScript from behaving like this?
Note: See TracTickets for help on using tickets.