Revision: 2159
http://mrbs.svn.sourceforge.net/mrbs/?rev=2159&view=rev
Author: cimorrison
Date: 2011-11-02 09:53:01 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
Got rid of some undefined index notices
Modified Paths:
--------------
mrbs/trunk/web/edit_entry.php
mrbs/trunk/web/edit_users.php
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2011-11-02 09:34:14 UTC (rev 2158)
+++ mrbs/trunk/web/edit_entry.php 2011-11-02 09:53:01 UTC (rev 2159)
@@ -796,7 +796,7 @@
<?php
echo "<div id=\"div_name\">\n";
$label_text = get_vocab("namebooker") . ":";
- if (count($select_options['entry.name']) > 0)
+ if (!empty($select_options['entry.name']))
{
generate_select($label_text, 'name', $name,
$select_options['entry.name']);
}
@@ -808,7 +808,7 @@
echo "<div id=\"div_description\">\n";
$label_text = get_vocab("fulldescription");
- if (count($select_options['entry.description']) > 0)
+ if (!empty($select_options['entry.description']))
{
generate_select($label_text, 'description', $description,
$select_options['entry.description']);
}
@@ -1133,7 +1133,7 @@
">\n";
}
// Output a select box if they want one
- elseif (count($select_options["entry.$key"]) > 0)
+ elseif (!empty($select_options["entry.$key"]))
{
$mandatory = (array_key_exists("entry.$key", $is_mandatory_field) &&
$is_mandatory_field["entry.$key"]) ? true : false;
Modified: mrbs/trunk/web/edit_users.php
===================================================================
--- mrbs/trunk/web/edit_users.php 2011-11-02 09:34:14 UTC (rev 2158)
+++ mrbs/trunk/web/edit_users.php 2011-11-02 09:53:01 UTC (rev 2159)
@@ -309,7 +309,7 @@
">\n";
}
// Output a select box if they want one
- elseif (count($select_options["users.$key"]) > 0)
+ elseif (!empty($select_options["users.$key"]))
{
generate_select($label_text, $var_name, $data[$key],
$select_options["users.$key"]);
}
@@ -832,7 +832,14 @@
// the value rather than the key
if (is_assoc($select_options["users.$key"]))
{
- $col_value = $select_options["users.$key"][$row[$key]];
+ if (isset($select_options["users.$key"][$row[$key]]))
+ {
+ $col_value = $select_options["users.$key"][$row[$key]];
+ }
+ else
+ {
+ $col_value = '';
+ }
echo "<td><div>" . htmlspecialchars($col_value) .
"</div></td>\n";
}
elseif (($field['nature'] == 'boolean') ||
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits