You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a property of a Model is supposed to be a list of some subtype (for example taxes of the InvoiceEstimate), but the ChargeBee returns 0 items in the list, the list is not becoming an empty array, but an (empty) instance of the list type.
It looks like that this can be fixed by isHash function (inside ChargeBee_Model) returning false not only when not being an array, but also when the array is empy.
private function isHash($array)
{
if (!is_array($array) || count($array) === 0)
return false;
foreach (array_keys($array) as $k) {
if (is_numeric($k))
return false;
}
return true;
}
The text was updated successfully, but these errors were encountered:
When a property of a Model is supposed to be a list of some subtype (for example
taxes
of theInvoiceEstimate
), but the ChargeBee returns 0 items in the list, the list is not becoming an empty array, but an (empty) instance of the list type.It looks like that this can be fixed by
isHash
function (insideChargeBee_Model
) returning false not only when not being an array, but also when the array is empy.The text was updated successfully, but these errors were encountered: