From 3a5691369c5012eb14609d225b41a4b90e1e3e20 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 21 Oct 2004 20:15:14 +0000 Subject: [ 1050974 ] warning: "Invalid argument supplied for foreach()" Fixed. --- functions/list_functions.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'functions/list_functions.php') 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 .= ' '.$val.'
'; - $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 .= ' '.$val.'
'; + $i++; + } } return $return; } -- cgit v1.2.3