Remove use of each() as it is deprecated
[squirrelmail.git] / functions / abook_database.php
index e0f12c5af2eeb0b23186b31dd82d64de1a685efc..45c2146d5f80259360a16316f78df0d77a1e3f28 100644 (file)
@@ -681,7 +681,7 @@ class abook_database extends addressbook_backend {
             $sepstr = '';
             $where_clause = '';
             $where_clause_args = array();
-            while (list($undef, $nickname) = each($alias)) {
+            foreach ($alias as $nickname) {
                 $where_clause .= $sepstr . $this->identifier_quote_char . 'nickname' . $this->identifier_quote_char . ' = ?';
                 $where_clause_args[] = $nickname;
                 $sepstr = ' OR ';
@@ -705,7 +705,7 @@ class abook_database extends addressbook_backend {
                              $this->table, $this->owner);
 
             $sepstr = '';
-            while (list($undef, $nickname) = each($alias)) {
+            foreach ($alias as $nickname) {
                 $query .= sprintf("%s nickname='%s' ", $sepstr,
                                   $this->dbh->quoteString($nickname));
                 $sepstr = 'OR';