mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Handle non existing fields in query
This commit is contained in:
@@ -19,6 +19,9 @@ class QueryContext
|
||||
{
|
||||
// Ensure we are not escaping from original fields restrictions
|
||||
$fields = array_intersect($this->fields, $fields);
|
||||
if (!$fields) {
|
||||
throw new \Exception('Query narrowed to non available fields');
|
||||
}
|
||||
|
||||
return new static($this->locales, $this->queryLocale, $fields);
|
||||
}
|
||||
|
Reference in New Issue
Block a user