Allow complex filtering when only one level is set
When using complex filtering, one could use as filter argument ($values):
array(
'fieldname' => array(
'op' => 'someop',
'data' => 'somevalue',
),
);
or
array(
'fieldname' => array(
array(
'op' => 'someop',
'data' => 'somevalue',
),
array(
'op' => 'someop2',
'data' => 'somevalue2',
),
),
);
but the following syntax was not supported:
array(
'fieldname' => array(
array(
'op' => 'someop',
'data' => 'somevalue',
),
),
);
This last syntax should be supported as complex filters might be auto-generated by some process that should not have to worry, in the end, if they provide just one or several complex filters for a field.
This patch does the trick.