aboutsummaryrefslogtreecommitdiffstats
path: root/functions/list_functions.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-10-21 20:15:14 +0000
committerChad Little <clittle@users.sourceforge.net>2004-10-21 20:15:14 +0000
commit3a5691369c5012eb14609d225b41a4b90e1e3e20 (patch)
treea0e2ada0e56046948780cf2f8fd5da7b48fce955 /functions/list_functions.php
parented66aa0f099f5f50d327048912ce6a116f473ba1 (diff)
downloadphpicalendar-3a5691369c5012eb14609d225b41a4b90e1e3e20.tar.gz
phpicalendar-3a5691369c5012eb14609d225b41a4b90e1e3e20.tar.bz2
phpicalendar-3a5691369c5012eb14609d225b41a4b90e1e3e20.zip
[ 1050974 ] warning: "Invalid argument supplied for foreach()"
Fixed.
Diffstat (limited to 'functions/list_functions.php')
-rw-r--r--functions/list_functions.php12
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;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy