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

Bug #17412 Fatal error: Call to undefined method Validate_Finance_IBAN::iserror()
Submitted: 2010-05-19 12:07 UTC
From: mensler Assigned: neufeind
Status: Closed Package: Validate_Finance (version 0.5.5)
PHP Version: 5.2.6 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2010-05-19 12:07 UTC] mensler (Clemens Weiß)
Description: ------------ I get a fatal error when calling getBankcode() on an invalid IBAN without validating first. Patch: @@ -38,6 +38,7 @@ define('VALIDATE_FINANCE_IBAN_INVALID_FORMAT', -7); define('VALIDATE_FINANCE_IBAN_CHECKSUM_INVALID', -8); +require_once 'PEAR.php'; /** * Validate and process IBAN (international bank account numbers) * @@ -665,7 +666,7 @@ } // If this is an error object, then grab the corresponding error code - if (VALIDATE_FINANCE_IBAN::isError($value)) { + if (PEAR::isError($value)) { $value = $value->getCode(); } Test script: --------------- $Validator = new Validate_Finance_IBAN('foobar'); echo $Validator->getBankcode(); Expected result: ---------------- Warning (512): IBAN generally invalid Actual result: -------------- Fatal error: Call to undefined method Validate_Finance_IBAN::iserror() in .../Validate/Finance/IBAN.php on line 668

Comments

 [2010-05-19 12:21 UTC] neufeind (Stefan Neufeind)
-Status: Open +Status: Closed -Assigned To: +Assigned To: neufeind
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.