From: <ji...@us...> - 2005-11-29 03:51:59
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4221/phpicalendar/functions Modified Files: template.php Log Message: patches to template.php to handle empty master array without warning on bad foreach - suggested from the bbs by andrew. See http://phpicalendar.net/forums/viewtopic.php?t=292 Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** template.php 30 Oct 2005 01:32:44 -0000 1.76 --- template.php 29 Nov 2005 03:51:50 -0000 1.77 *************** *** 270,274 **** $colspan = 'colspan="'.$nbrGridCols[$get_date].'"'; $replace = str_replace('{COLSPAN}', $colspan, $replace); ! if (is_array($master_array[$get_date]['-1'])) { foreach ($master_array[$get_date]['-1'] as $uid => $allday) { $event_calno = $allday['calnumber']; --- 270,274 ---- $colspan = 'colspan="'.$nbrGridCols[$get_date].'"'; $replace = str_replace('{COLSPAN}', $colspan, $replace); ! if (is_array($master_array[$get_date]['-1']) && !empty($master_array[$get_date]['-1']) ) { foreach ($master_array[$get_date]['-1'] as $uid => $allday) { $event_calno = $allday['calnumber']; |