From 45b31e3e14d3e738c2f6e781c21c1f016629ec90 Mon Sep 17 00:00:00 2001 From: skeeter Date: Tue, 6 Nov 2001 23:59:27 +0000 Subject: [PATCH] Fix for bug #478669. --- calendar/setup/tables_update.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calendar/setup/tables_update.inc.php b/calendar/setup/tables_update.inc.php index 140085b7e1..020f0782ad 100644 --- a/calendar/setup/tables_update.inc.php +++ b/calendar/setup/tables_update.inc.php @@ -881,6 +881,7 @@ $test[] = '0.9.13.005'; function calendar_upgrade0_9_13_005() { + $calendar_data = Array(); $GLOBALS['phpgw_setup']->oProc->query('SELECT cal_id, category FROM phpgw_cal',__LINE__,__FILE__); while($GLOBALS['phpgw_setup']->oProc->next_record()) { @@ -890,7 +891,7 @@ $GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_cal','category',array('type' => 'varchar', 'precision' => 30,'nullable' => True)); @reset($calendar_data); - while(list($cal_id,$category) = each($calendar_data)) + while($calendar_data && list($cal_id,$category) = each($calendar_data)) { $GLOBALS['phpgw_setup']->oProc->query("UPDATE phpgw_cal SET category='".$category."' WHERE cal_id=".$cal_id,__LINE__,__FILE__); }