-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
CakePHP v2.3, PHP v5.4
The FilteredBehavior returns an empty $query['conditions']-array.
A little research learned me this:
function beforeFind(Model $Model, $query)
{
...
$settings = $this->settings[$Model->alias];
$values = $this->_filterValues[$Model->alias];
foreach ($settings as $field => $options)
{
$this->addFieldToFilter($Model, $query, $settings, $values, $field, $options);
}
...
return $query;
}
Inhere, the methodcall
$this->addFieldToFilter($Model, $query, $settings, $values, $field, $options); returns an empty $query['conditions']-array.
Some new investigations:
protected function buildFilterConditions(array $query, $field, $options, $value)
{
...
}
The method creates the $query['conditions'] well, but after the transfer to beforeFind, it is empty. The only place where the $query['conditions']-array is properly set is after switch{ ... }.
any suggestions?
Metadata
Metadata
Assignees
Labels
No labels