summaryrefslogtreecommitdiffstats
path: root/lib/public/contacts.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/contacts.php')
-rw-r--r--lib/public/contacts.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public/contacts.php b/lib/public/contacts.php
index d14806bd0c4..412600dd7f6 100644
--- a/lib/public/contacts.php
+++ b/lib/public/contacts.php
@@ -108,10 +108,10 @@ namespace OCP {
* @return array of contacts which are arrays of key-value-pairs
*/
public static function search($pattern, $searchProperties = array(), $options = array()) {
-
$result = array();
foreach(self::$address_books as $address_book) {
- $result = $result + $address_book->search($pattern, $searchProperties, $options);
+ $r = $address_book->search($pattern, $searchProperties, $options);
+ $result = array_merge($result, $r);
}
return $result;