1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Contacts: Fix undefined indexes on search.

This commit is contained in:
Thomas Tanghus 2013-02-24 02:20:19 +01:00
parent 06291c9f41
commit cab4ceea84

View File

@ -12,7 +12,7 @@ class SearchProvider extends \OC_Search_Provider{
$link = \OCP\Util::linkTo('contacts', 'index.php').'#' . $vcard['id'];
$props = array();
foreach(array('EMAIL', 'NICKNAME', 'ORG') as $searchvar) {
if(count($result[$searchvar]) > 0 && strlen($result[$searchvar][0]) > 3) {
if(isset($result[$searchvar]) && count($result[$searchvar]) > 0 && strlen($result[$searchvar][0]) > 3) {
$props = array_merge($props, $result[$searchvar]);
}
}