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

Bug #3821 Undefined index in Common.php
Submitted: 2005-03-15 07:12 UTC
From: jausions Assigned: jstump
Status: Closed Package: Payment_Process
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-15 07:12 UTC] jausions
Description: ------------ If setting an unsupported payment type using setPayment() method, PHP complains about the payment type not being an index in the _typeFieldMap array. (error level: E_ALL) Reproduce code: --------------- $processor =& Payment_Process::factory('Dummy'); $cc =& Payment_Process_Type::factory('CreditCard'); var_dump($processor->setPayment($cc)); Expected result: ---------------- Doesn't complain. Returns FALSE Actual result: -------------- Notice: Undefined index: CreditCard in C:\php\PEAR\Payment\Process\Common.php on line 227 (Note: line # is approximatif as I am working on patches for this package)

Comments

 [2005-03-15 07:13 UTC] jausions
Solution is to of course, silence (@) the is_array() call... -Philippe
 [2005-07-07 23:04 UTC] jstump
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.