aboutsummaryrefslogtreecommitdiffstats
path: root/functions/template.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2005-11-29 03:51:50 +0000
committerJim Hu <jimhu@users.sourceforge.net>2005-11-29 03:51:50 +0000
commit2b469d2b56c288f8fc18d004ed85e55832739e6f (patch)
treeb822e7f0a40845d48f6bb47f46a41690ee79989c /functions/template.php
parent6b786f6023ec8ff6e8ece7b352d0fa95b7946e02 (diff)
downloadphpicalendar-2b469d2b56c288f8fc18d004ed85e55832739e6f.tar.gz
phpicalendar-2b469d2b56c288f8fc18d004ed85e55832739e6f.tar.bz2
phpicalendar-2b469d2b56c288f8fc18d004ed85e55832739e6f.zip
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
Diffstat (limited to 'functions/template.php')
-rw-r--r--functions/template.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions/template.php b/functions/template.php
index e18b101..260d057 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -269,7 +269,7 @@ class Page {
$replace = $loop_begin;
$colspan = 'colspan="'.$nbrGridCols[$get_date].'"';
$replace = str_replace('{COLSPAN}', $colspan, $replace);
- if (is_array($master_array[$get_date]['-1'])) {
+ 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'];
$event_calno = (($event_calno - 1) % $unique_colors) + 1;

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