Opened 16 years ago

Last modified 15 years ago

#2642 new defect

getFilter() returns filter string with double quotes

Reported by: armin Owned by: dmorissette
Priority: normal Milestone: 6.0 release
Component: MapScript-PHP Version: unspecified
Severity: normal Keywords:
Cc: sdlime

Description

if the FILTER definition in the map file is placed inside double quotes, the request getFilter() or getFilterString() for a layer object returns the filter string literally, i.e. with the double quotes. The same happens to getExpression() on a class object.

If this is an intended behaviour it should at least be mentioned in the docs to avoid quotes in the map file. The problem arises e.g. when I return the filter expression for a PostGIS layer and apply it again on the layer, it will give an error since the WHERE clause sent to the database includes the double quotes (which is not valid SQL).

Change History (2)

comment:1 by dmorissette, 16 years ago

Cc: sdlime added
Milestone: 5.2 release5.4 release
Owner: changed from mapserverbugs to dmorissette

This is not specific to PHP MapScript, that's the way msGetExpressionString() is expected to work.

Not sure what to do about this one, but we're definitely too late for 5.2. Setting target milestone to 5.4 and adding Steve to CC to get his comments.

comment:2 by dmorissette, 15 years ago

Milestone: 5.4 release6.0 release
Note: See TracTickets for help on using tickets.