Bug #19305 [Opn->Csd]: Wrong string comparison in DTA::getMetaData()
| From: | info at mschuette dot name | Date: | Sat, 25 Feb 2012 14:10:51 +0000 |
| Subject: | Bug #19305 [Opn->Csd]: Wrong string comparison in DTA::getMetaData() | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8323@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19305&edit=1
ID: 19305
Updated by: info@mschuette.name
Reported By: login dot naitsirch at arcor dot de
Summary: Wrong string comparison in DTA::getMetaData()
-Status: Open
+Status: Closed
Type: Bug
Package: Payment_DTA
Operating System: Win 7
Package Version: 1.4.2
PHP Version: 5.3.9
-Assigned To:
+Assigned To: mschuett
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: mschuett
Thanks. I committed the fix to SVN.
Previous Comments:
------------------------------------------------------------------------
[2012-02-24 10:19:19] naitsirch
Here's a screenshot where you see the content of 'exec_date' and that
the part of code is executed although it should not.
URI: http://img19.imageshack.us/img19/8311/dtaerroringetmetadata.png
------------------------------------------------------------------------
[2012-02-24 10:12:03] naitsirch
Description:
------------
When I call $dta->getMetaData(), after an existing DTA file has been
parsed, the variable "$this->account_file_sender["exec_date"]" consists
on some spaces. So it was !== "".
The string saved in $this->account_file_sender["exec_date"] should be
trimmed before it is compared with "".
Here a "handmade" diff, how the error could be solved:
- if ($this->account_file_sender["exec_date"] !== "") {
+ if (trim($this->account_file_sender["exec_date"]) !== "") {
I'll try to upload a screenshot from my IDE during the debug process.
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19305&edit=1