Merge pull request #4 from rullzer/allow_404

No need to error out if the propery can't be found
This commit is contained in:
Robin Appelman 2018-03-22 16:55:28 +01:00 committed by GitHub
commit aa91e9c193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,7 +112,7 @@ class SearchHandler {
}, $xml->orderBy);
$select = array_map(function ($propName) use ($allProps) {
if (!isset($allProps[$propName])) {
throw new BadRequest('requested property is not a valid property for this scope');
return;
}
$prop = $allProps[$propName];
if (!$prop->selectable) {
@ -120,6 +120,7 @@ class SearchHandler {
}
return $prop;
}, $xml->select);
$select = array_filter($select);
$where = $this->transformOperator($xml->where, $allProps);