diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-10-21 20:15:14 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-10-21 20:15:14 +0000 |
commit | 3a5691369c5012eb14609d225b41a4b90e1e3e20 (patch) | |
tree | a0e2ada0e56046948780cf2f8fd5da7b48fce955 | |
parent | ed66aa0f099f5f50d327048912ce6a116f473ba1 (diff) | |
download | phpicalendar-3a5691369c5012eb14609d225b41a4b90e1e3e20.tar.gz phpicalendar-3a5691369c5012eb14609d225b41a4b90e1e3e20.tar.bz2 phpicalendar-3a5691369c5012eb14609d225b41a4b90e1e3e20.zip |
[ 1050974 ] warning: "Invalid argument supplied for foreach()"
Fixed.
-rw-r--r-- | functions/list_functions.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/functions/list_functions.php b/functions/list_functions.php index d17a186..85a4ebd 100644 --- a/functions/list_functions.php +++ b/functions/list_functions.php @@ -14,11 +14,13 @@ function list_jumps() { function list_calcolors() { 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++; + 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; } |