From db5831c5e4cbe29d5566e56f05fb1157321bb45c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 1 Apr 2021 14:30:26 +0200 Subject: [PATCH] fix PHP 8 error: undefined function each() --- calendar/setup/tables_update.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/calendar/setup/tables_update.inc.php b/calendar/setup/tables_update.inc.php index 67fdb13955..ee9301c92a 100644 --- a/calendar/setup/tables_update.inc.php +++ b/calendar/setup/tables_update.inc.php @@ -896,8 +896,7 @@ function calendar_upgrade0_9_13_005() $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_cal','category',array('type' => 'varchar', 'precision' => 30,'nullable' => True)); - @reset($calendar_data); - while($calendar_data && list($cal_id,$category) = each($calendar_data)) + foreach($calendar_data as $cal_id => $category) { $GLOBALS['egw_setup']->oProc->query("UPDATE phpgw_cal SET category='".$category."' WHERE cal_id=".$cal_id,__LINE__,__FILE__); }