Bug #19305 [Com]: Wrong string comparison in DTA::getMetaData()

From: Date: Fri, 24 Feb 2012 10:19:19 +0000
Subject: Bug #19305 [Com]: Wrong string comparison in DTA::getMetaData()
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8315@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 Comment by: login.naitsirch@arcor.de Reported By: login dot naitsirch at arcor dot de Summary: Wrong string comparison in DTA::getMetaData() Status: Open Type: Bug Package: Payment_DTA Operating System: Win 7 Package Version: 1.4.2 PHP Version: 5.3.9 Roadmap Versions: New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [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

« previous php.pear.bugs (#8315) next »