Skip to content
Permalink
Browse files

WFS GetFeature throws and exception when EXP_FILTER has errors

... instead of silently returning all features
  • Loading branch information
elpaso committed Jan 21, 2019
1 parent 681707b commit d4ac93189883e602793dea160b02836915c702d8
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/server/services/wfs/qgswfsgetfeature.cpp
@@ -673,16 +673,13 @@ namespace QgsWfs
{
if ( filter->hasParserError() )
{
QgsMessageLog::logMessage( filter->parserErrorString() );
throw QgsRequestNotWellFormedException( QStringLiteral( "The EXP_FILTER expression has errors: %1" ).arg( filter->parserErrorString() ) );
}
else
if ( filter->needsGeometry() )
{
if ( filter->needsGeometry() )
{
query.featureRequest.setFlags( QgsFeatureRequest::NoFlags );
}
query.featureRequest.setFilterExpression( filter->expression() );
query.featureRequest.setFlags( QgsFeatureRequest::NoFlags );
}
query.featureRequest.setFilterExpression( filter->expression() );
}
}
}

0 comments on commit d4ac931

Please sign in to comment.
You can’t perform that action at this time.