Revision: 1048
http://mrbs.svn.sourceforge.net/mrbs/?rev=1048&view=rev
Author: cimorrison
Date: 2009-03-13 22:29:51 +0000 (Fri, 13 Mar 2009)
Log Message:
-----------
Fixed some potential undefined index NOTICE errors.
Modified Paths:
--------------
mrbs/trunk/web/day.php
mrbs/trunk/web/functions.inc
mrbs/trunk/web/week.php
Modified: mrbs/trunk/web/day.php
===================================================================
--- mrbs/trunk/web/day.php 2009-03-13 19:44:08 UTC (rev 1047)
+++ mrbs/trunk/web/day.php 2009-03-13 22:29:51 UTC (rev 1048)
@@ -381,6 +381,10 @@
$query_strings['new_times'] =
"area=$area&room=$room_id&hour=$hour&minute=$minute&year=$year&month=$month&day=$day";
$query_strings['booking'] =
"area=$area&day=$day&month=$month&year=$year";
// and then draw the cell
+ if (!isset($today[$room_id][$day][$time_t]))
+ {
+ $today[$room_id][$day][$time_t] = array(); // to avoid an undefined
index NOTICE error
+ }
draw_cell($today[$room_id][$day][$time_t], $query_strings, $row_class);
}
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2009-03-13 19:44:08 UTC (rev 1047)
+++ mrbs/trunk/web/functions.inc 2009-03-13 22:29:51 UTC (rev 1048)
@@ -885,6 +885,7 @@
$column[$time_t][$n]["id"] = $row['entry_id'];
$column[$time_t][$n]["color"] = $row['type'];
$column[$time_t][$n]["start_time"] = utf8_strftime(hour_min_format(),
$row['start_time']);
+ $column[$time_t][$n]["slots"] = null; // to avoid undefined index NOTICE
errors
// if it's a multiple booking also fill in the name and description
if ($n > 0)
{
Modified: mrbs/trunk/web/week.php
===================================================================
--- mrbs/trunk/web/week.php 2009-03-13 19:44:08 UTC (rev 1047)
+++ mrbs/trunk/web/week.php 2009-03-13 22:29:51 UTC (rev 1048)
@@ -426,6 +426,10 @@
$query_strings['booking'] =
"area=$area&day=$wday&month=$wmonth&year=$wyear";
// and then draw the cell
+ if (!isset($week_map[$room][$thisday][$time_t]))
+ {
+ $week_map[$room][$thisday][$time_t] = array(); // to avoid an
undefined index NOTICE error
+ }
draw_cell($week_map[$room][$thisday][$time_t], $query_strings,
$row_class);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits