I use the following code:
$query = Criteria::fromInput($this->di, 'Objects', $array);
$this->persistent->searchParams = $query->getParams();
if ($this->persistent->searchParams) {
$parameters = $this->persistent->searchParams;
}
$objects = Objects::find($parameters);
The problem is, when I have only one value in $array (Array ( [country_id] => HR )) , I get ''Undefined variable ""parameters"" error.
When I have multiple values, it works fine.
Is this a bug or is it supposed to work like this?