diff --git a/api/src/Contacts.php b/api/src/Contacts.php index 89cbeccb2c..646abe0b23 100755 --- a/api/src/Contacts.php +++ b/api/src/Contacts.php @@ -1337,7 +1337,8 @@ class Contacts extends Contacts\Storage if (!in_array($name,$this->org_fields)) continue; arsort($values,SORT_NUMERIC); - list($value,$num) = each($values); + $value = key($values); + $num = current($values); if ($value && $num / (double) count($contacts) >= $this->org_common_factor) { if (!in_array($name,$csvs)) diff --git a/api/src/Db/Schema.php b/api/src/Db/Schema.php index 8d67f133ce..ab232f51d7 100644 --- a/api/src/Db/Schema.php +++ b/api/src/Db/Schema.php @@ -1077,7 +1077,7 @@ class Schema break; case 'array': case 'object': - list(,$content) = @each($param); + $content = @current($param); $do_pre = is_array($param) ? count($param) > 6 || is_array($content)&&count($content) : True; $param = ($do_pre ? '
' : '').print_r($param,True).($do_pre ? '
' : ''); break; diff --git a/api/src/Etemplate/Widget/Nextmatch.php b/api/src/Etemplate/Widget/Nextmatch.php index b7d40b983f..aad89c43fc 100644 --- a/api/src/Etemplate/Widget/Nextmatch.php +++ b/api/src/Etemplate/Widget/Nextmatch.php @@ -310,7 +310,7 @@ class Nextmatch extends Etemplate\Widget $filters = $valid_filters[$form_name]; } // Avoid empty arrays, they cause problems with db filtering - foreach((array)$filters['col_filter'] as $col => &$val) + foreach((array)$filters['col_filter'] as $col => $val) { if(is_array($val) && count($val) == 0) { diff --git a/api/src/Etemplate/Widget/Vfs.php b/api/src/Etemplate/Widget/Vfs.php index 75d56929f9..d2d45a49c2 100644 --- a/api/src/Etemplate/Widget/Vfs.php +++ b/api/src/Etemplate/Widget/Vfs.php @@ -432,7 +432,7 @@ class Vfs extends File if (isset($params['mime'])) { $content['showmime'] = true; - list($content['mime']) = each($sel_options['mime']); + $content['mime'] = key($sel_options['mime']); } } elseif(isset($content['action'])) diff --git a/api/src/Framework.php b/api/src/Framework.php index c40661bb7e..73261beebe 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -779,7 +779,7 @@ abstract class Framework extends Framework\Extra */ protected static function _get_navbar_apps($svg=false) { - list($first) = each($GLOBALS['egw_info']['user']['apps']); + $first = key($GLOBALS['egw_info']['user']['apps']); if(is_array($GLOBALS['egw_info']['user']['apps']['admin']) && $first != 'admin') { $newarray['admin'] = $GLOBALS['egw_info']['user']['apps']['admin']; diff --git a/api/src/Framework/Login.php b/api/src/Framework/Login.php index 1e20333d16..be7bbd650a 100644 --- a/api/src/Framework/Login.php +++ b/api/src/Framework/Login.php @@ -119,7 +119,7 @@ class Login if($last_loginid !== '') { reset($GLOBALS['egw_domain']); - list($default_domain) = each($GLOBALS['egw_domain']); + $default_domain = key($GLOBALS['egw_domain']); if(!empty ($last_domain) && $last_domain != $default_domain) { diff --git a/api/src/Html.php b/api/src/Html.php index 5772852291..3ab09c96f2 100644 --- a/api/src/Html.php +++ b/api/src/Html.php @@ -1297,7 +1297,7 @@ tinymce.init({ $image1 = $image2 = $image3 = "'".$_leafImage."'"; if (($next_item = array_slice($_folders, $n+1, 1, true))) { - list($next_path) = each($next_item); + $next_path = key($next_item); if (substr($next_path,0,strlen($path)+1) == $path.'/') { $image1 = $image2 = $image3 = '0'; diff --git a/api/src/Link.php b/api/src/Link.php index 281fb48714..1034a67007 100644 --- a/api/src/Link.php +++ b/api/src/Link.php @@ -364,7 +364,7 @@ class Link extends Link\Storage { reset($app2); $link_id = True; - while ($link_id && list(,$link) = each($app2)) + while ($link_id && $link = current($app2)) { if (!is_array($link)) // check for unlink-marker { @@ -401,6 +401,7 @@ class Link extends Link\Storage if (!($no_notify&1)) self::notify('link',$app1,$id1,$link['app'],$link['id'],$link_id); break; } + next($app2); } return $link_id; } diff --git a/api/src/Session.php b/api/src/Session.php index 5066024d08..e95f504754 100644 --- a/api/src/Session.php +++ b/api/src/Session.php @@ -1396,7 +1396,7 @@ class Session else { reset($domains); - list($default_domain) = each($domains); + $default_domain = key($domains); } unset($domain_part); }