In the method \ChargeBee_Model::__get there is a bug affecting snake case fields:
public function __get($k)
{
if (isset($this->_data[$k]))
{
return $this->_data[$k];
}
else if(in_array($k, $this->allowed))
{
return null;
}
The property allowed contains snake case fields (i.e. "CustomerBillingAddress" has "first_name").
However "_data" field contains keys already converted to camelCase. See line 131 of the same file:
In the method
\ChargeBee_Model::__get
there is a bug affecting snake case fields:The property
allowed
contains snake case fields (i.e. "CustomerBillingAddress" has "first_name"). However "_data" field contains keys already converted to camelCase. See line 131 of the same file:So if the first name in billing address is empty, both
$billingAddress->first_name
and$billingAddress->firstName
throws an error.Expected result: if the field is empty it should return null