Ticket #2642 (new defect)

Opened 5 years ago

Last modified 4 years ago

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

Changed 5 years ago by dmorissette

  • cc sdlime added
  • owner changed from mapserverbugs to dmorissette
  • milestone changed from 5.2 release to 5.4 release

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.

Changed 4 years ago by dmorissette

  • milestone changed from 5.4 release to 6.0 release
Note: See TracTickets for help on using tickets.