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:
Jay Patel
2015-04-15 11:59:48 -05:00
parent 553589e511
commit ec58775bca
2 changed files with 26 additions and 1 deletions

View File

@@ -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;