Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.3

Bug #1387 Notice on line 195
Submitted: 2004-05-11 22:28 UTC
From: mw21st Assigned: hstainer
Status: Closed Package: Payment_DTA
PHP Version: Irrelevant OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 23 + 39 = ?

 
 [2004-05-11 22:28 UTC] mw21st
Description: ------------ With error_reporting set to E_ALL, the class will throw a notice if a string with zero length is being passed to makeValidString(). This is because at the beginning of the method the string is checked if it has zero length - but if it hasn't, the variable never gets initialized. This could be fixed by initializing the variable with an empty string, but in case of flawed data input, this would lead to corrupt DTA files. It would be better if data would be checked and false would be returned from addExchange() in case of bad input. Not good: The field 'additional_name' in the parameter array for addExchange() is supposed to be optional - but if the string is empty, the notice will appear here as well. Expected result: ---------------- No notice :-) Actual result: -------------- Notice: Undefined variable: result in /PEAR/Payment/DTA.php on line 195

Comments

 [2004-05-24 12:05 UTC] hstainer
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/packages.php Fixed in version 1.00. Thanks to Markus Wolff! Note: checking input and returning false if there is any incorrect (syntax) or missing data is already done by addExchange().