Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 d4ac931
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/server/services/wfs/qgswfsgetfeature.cpp
Expand Up @@ -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() );
}
}
}
Expand Down

0 comments on commit d4ac931

Please sign in to comment.