forked from LiveCarta/PayPal-PHP-SDK
PayPalModel Set Conditions updated
- passing null to setter would unset the value - passing empty string would set the value as empty string - passing 0 would set the value as 0 - Fixes #285
This commit is contained in:
@@ -106,7 +106,7 @@ class PayPalModel
|
||||
public function __set($key, $value)
|
||||
{
|
||||
ModelAccessorValidator::validate($this, $this->convertToCamelCase($key));
|
||||
if (!is_array($value) && $value == null) {
|
||||
if (!is_array($value) && $value === null) {
|
||||
$this->__unset($key);
|
||||
} else {
|
||||
$this->_propMap[$key] = $value;
|
||||
|
||||
Reference in New Issue
Block a user