fix PHP 8 error: undefined function each()

This commit is contained in:
Ralf Becker 2021-04-01 14:30:26 +02:00
parent e0c4179512
commit db5831c5e4

View File

@ -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__);
}