svn: /web/php-bugs/trunk/include/ functions.php
| From: | Felipe Pena | Date: | Sat, 02 Jul 2011 18:32:50 +0000 |
| Subject: | svn: /web/php-bugs/trunk/include/ functions.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-11436@lists.php.net to get a copy of this message | ||
felipe Sat, 02 Jul 2011 18:32:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=312818
Log:
- Fix warnings
Changed paths:
U web/php-bugs/trunk/include/functions.php
Modified: web/php-bugs/trunk/include/functions.php
===================================================================
--- web/php-bugs/trunk/include/functions.php 2011-07-02 17:12:20 UTC (rev 312817)
+++ web/php-bugs/trunk/include/functions.php 2011-07-02 18:32:50 UTC (rev 312818)
@@ -766,7 +766,7 @@
{
$changed = array();
- if ($in['email'] && (trim($in['email']) !=
trim($bug['email']))) {
+ if (!empty($in['email']) && (trim($in['email']) !=
trim($bug['email']))) {
$changed['reported_by']['from'] = $bug['email'];
$changed['reported_by']['to'] = spam_protect(txfield('email', $bug,
$in), 'text');
}
@@ -859,7 +859,7 @@
$from = str_replace(array("\n", "\r"), '', $from);
/* Default addresses */
- list($mailto, $mailfrom, $Bcc, $params) = get_package_mail(oneof($in['package_name'],
$bug['package_name']), $id, oneof($in['bug_type'], $bug['bug_type']));
+ list($mailto, $mailfrom, $Bcc, $params) = get_package_mail(oneof(@$in['package_name'],
$bug['package_name']), $id, oneof(@$in['bug_type'],
$bug['bug_type']));
$headers[] = array(' ID', $bug['id']);
@@ -973,7 +973,7 @@
$sdesc = txfield('sdesc', $bug, $in);
/* send mail if status was changed, there is a comment, private turned on/off or the bug type was
changed to/from Security */
- if ($in['status'] != $bug['status'] || $ncomment != '' ||
+ if (!empty($in['status']) || $in['status'] != $bug['status'] ||
$ncomment != '' ||
(isset($in['private']) && $in['private'] !=
$bug['private']) ||
(isset($in['bug_type']) && $in['bug_type'] !=
$bug['bug_type'] &&
($in['bug_type'] == 'Security' || $bug['bug_type'] ==
'Security'))) {
@@ -984,7 +984,7 @@
$old_status = $bug['status'];
$new_status = $bug['status'];
- if ($in['status'] != $bug['status'] && $edit != 3) { /* status
changed */
+ if (isset($in['status']) && $in['status'] != $bug['status']
&& $edit != 3) { /* status changed */
$new_status = $in['status'];
$subj .= " #{$bug['id']} [{$tla[$old_status]}->{$tla[$new_status]}]";
} elseif ($edit == 4) { /* patch */