forked from LiveCarta/PayPal-PHP-SDK
Removed ModelAccessValidator in favor of Forward Compatilibity Issues
- Model Access Validator causes unnecessary issues in existing integrations. - Causes merchant to break integration if configured incorrectly.
This commit is contained in:
@@ -122,7 +122,6 @@ class PayPalModel
|
||||
*/
|
||||
public function __set($key, $value)
|
||||
{
|
||||
ModelAccessorValidator::validate($this, $this->convertToCamelCase($key));
|
||||
if (!is_array($value) && $value === null) {
|
||||
$this->__unset($key);
|
||||
} else {
|
||||
@@ -249,13 +248,7 @@ class PayPalModel
|
||||
|
||||
private function assignValue($key, $value)
|
||||
{
|
||||
// If we find the getter setter, use that, otherwise use magic method.
|
||||
if (ModelAccessorValidator::validate($this, $this->convertToCamelCase($key))) {
|
||||
$setter = "set" . $this->convertToCamelCase($key);
|
||||
$this->$setter($value);
|
||||
} else {
|
||||
$this->__set($key, $value);
|
||||
}
|
||||
$this->__set($key, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user