PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Payment » Payment_Process » Bug #1264

Optional fields are never validated

Details

Submitted2004-04-23 04:29 UTC
Fromaashley at optimiser dot com
Assignedieure
StatusClosed
PackagePayment_Process
PHP Version5.0.0RC1 (Release Candidate 1)
OSLinux
Roadmaps(Not assigned)

Comments

[2004-04-23 04:29 UTC] aashley at optimiser dot com

Description:
------------
Optional fields are never validated in Common::validate()

patch to fix:
--- /usr/share/pear/Payment/Process/Common.php 2004-04-13 15:45:48.000000000 +0800
+++ Common.php 2004-04-21 22:37:25.000000000 +0800
@@ -58,7 +58,7 @@
$func = '_validate'.ucfirst($field);

// Don't validate unset optional fields
- if (! $this->isRequired($field) && !strlen($this->field)) {
+ if (! $this->isRequired($field) && !strlen($this->$field)) {
continue;
}