diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-01-19 11:46:52 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-01-19 11:46:52 +0000 |
| commit | d63c8e138c57db3f94bb4ef425aab96348aad87a (patch) | |
| tree | fc60f2cf82939fcb36bfc8488b1a29b363a11099 | |
| parent | 70be645779b214f73337fa8a3e6ef5d7debd53a4 (diff) | |
- fix warning when 'autocomplete_addressbooks' is not an array (#1485691)
git-svn-id: https://svn.roundcube.net/trunk@2243 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/steps/mail/autocomplete.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/autocomplete.inc b/roundcubemail/program/steps/mail/autocomplete.inc index 1000436c4..c840e9cf9 100644 --- a/roundcubemail/program/steps/mail/autocomplete.inc +++ b/roundcubemail/program/steps/mail/autocomplete.inc @@ -21,10 +21,11 @@ $MAXNUM = 15; // same limit as in app.js $contacts = array(); +$book_types = (array) $RCMAIL->config->get('autocomplete_addressbooks', 'sql'); -if ($search = get_input_value('_search', RCUBE_INPUT_POST)) { +if ($book_types && $search = get_input_value('_search', RCUBE_INPUT_POST)) { - foreach ($RCMAIL->config->get('autocomplete_addressbooks', array('sql')) as $id) { + foreach ($book_types as $id) { $abook = $RCMAIL->get_address_book($id); $abook->set_pagesize($MAXNUM); |
