roundcube/roundcubemail — pull request #186 by corbosman (2014-05-08 14:36:33+00:00)
Title: fix address book search

I noticed that address book searching was broken in my git checkout. This seems to be due to the fact that an empty _headers results in a $fields like:

```
Array
(
[0] =>
)
```

This is probably a bug of some kind in explode(). This is mentioned in comments of the explode() manual.

If $fields is not empty, it does not use $SEARCH_MODS_DEFAULT and it does not search any fields.

If you move the array_filter up, it should fix the issue.

Reproduce: go to addressbook. Search for a contact in rcube db making sure no _headers is passed along. (I dont actually know what adds _headers). No results are returned.