Revision: 2171
http://mrbs.svn.sourceforge.net/mrbs/?rev=2171&view=rev
Author: cimorrison
Date: 2011-11-03 14:41:20 +0000 (Thu, 03 Nov 2011)
Log Message:
-----------
Eliminated undefined index errors
Modified Paths:
--------------
mrbs/trunk/web/functions_mail.inc
Modified: mrbs/trunk/web/functions_mail.inc
===================================================================
--- mrbs/trunk/web/functions_mail.inc 2011-11-03 14:21:37 UTC (rev 2170)
+++ mrbs/trunk/web/functions_mail.inc 2011-11-03 14:41:20 UTC (rev 2171)
@@ -415,6 +415,13 @@
global $tbl_entry;
global $select_options;
+ // If we haven't got a previous entry just give it one. It won't get used,
+ // but will prevent a series if undefined index notices.
+ if (empty($mail_previous))
+ {
+ $mail_previous = $data;
+ }
+
// set up the body
$body = "";
if ($as_html)
@@ -640,7 +647,7 @@
}
$body .= create_body_table_row (get_mail_field_name($tbl_entry, $key),
$value,
- $mail_previous[$key],
+ ($compare) ? $mail_previous[$key] : '',
$compare, $as_html);
}
}
@@ -648,7 +655,7 @@
// Last updated
$body .= create_body_table_row (get_mail_vocab("lastupdate"),
getMailTimeDateString(time()),
-
getMailTimeDateString($mail_previous['last_updated']),
+ ($compare) ?
getMailTimeDateString($mail_previous['last_updated']) : '',
$compare, $as_html);
// Repeat Type
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
RSA(R) 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