From: <cl...@us...> - 2004-10-21 20:15:41
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23055/functions Modified Files: list_functions.php Log Message: [ 1050974 ] warning: "Invalid argument supplied for foreach()" Fixed. Index: list_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/list_functions.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** list_functions.php 3 Sep 2004 21:22:39 -0000 1.12 --- list_functions.php 21 Oct 2004 20:15:14 -0000 1.13 *************** *** 15,23 **** global $template, $master_array, $unique_colors; $i = 1; ! foreach ($master_array['-3'] as $key => $val) { ! if ($i > $unique_colors) $i = 1; ! $val = str_replace ("\,", ",", $val); ! $return .= '<img src="templates/'.$template.'/images/monthdot_'.$i.'.gif" alt="" /> '.$val.'<br />'; ! $i++; } return $return; --- 15,25 ---- global $template, $master_array, $unique_colors; $i = 1; ! if (is_array($master_array['-3'])) { ! foreach ($master_array['-3'] as $key => $val) { ! if ($i > $unique_colors) $i = 1; ! $val = str_replace ("\,", ",", $val); ! $return .= '<img src="templates/'.$template.'/images/monthdot_'.$i.'.gif" alt="" /> '.$val.'<br />'; ! $i++; ! } } return $return; |