svn: /web/php-bugs/trunk/include/ functions.php
| From: | Jani Taskinen | Date: | Tue, 09 Mar 2010 12:48:40 +0000 |
| Subject: | svn: /web/php-bugs/trunk/include/ functions.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-7525@lists.php.net to get a copy of this message | ||
jani Tue, 09 Mar 2010 12:48:40 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=295993
Log:
- Fix bug_diff() function to fully diff empty fields as well
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 2010-03-09 11:37:07 UTC (rev 295992)
+++ web/php-bugs/trunk/include/functions.php 2010-03-09 12:48:40 UTC (rev 295993)
@@ -693,9 +693,13 @@
);
foreach (array_keys($fields) as $name) {
- if (isset($in[$name]) && isset($bug[$name]) && (trim($in[$name]) !=
trim($bug[$name]))) {
- $changed[$name]['from'] = $bug[$name];
- $changed[$name]['to'] = txfield($name, $bug, $in);
+ if (array_key_exists($name, $in) && array_key_exists($name, $bug)) {
+ $to = trim($in[$name]);
+ $from = trim($bug[$name]);
+ if ($from != $to) {
+ $changed[$name]['from'] = $from;
+ $changed[$name]['to'] = $to;
+ }
}
}