Skip to content

Commit

Permalink
Don't use each().
Browse files Browse the repository at this point in the history
For modern PHP versions there is no improved performance or memory usage compared to foreach() anymore. Beside that it's deprecated in PHP 7.2.
  • Loading branch information
yunosh committed Feb 13, 2017
1 parent fb6c9fb commit 689a0a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Horde/History/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public function __construct($uid, $data = array())
return;
}

reset($data);
while (list(,$row) = each($data)) {
foreach ($data as $row) {
$history = array(
'action' => $row['history_action'],
'desc' => $row['history_desc'],
Expand Down

0 comments on commit 689a0a8

Please sign in to comment.