Closed rtarnaud closed 8 years ago
Hi @rtarnaud . Sorry I have been very busy. It's a bug in this method:
`` php
public function getErrorMessages()
{
$errorMessages = array();
if (is_array($this->errors)) { // <!-- FIXED
foreach ($this->errors as $error) {
$errorMessages[] = $error->getError();
}
}
return $errorMessages;
}
If the json response does not contain any error this methods fails. I am gooing to fix it, add a test, and build a new release. In the mean time you can check if `getErrors()` returns an array before calling `getErrorMessages()` mthod.
Thanks you very much.
Ok, thanks!
Fixed but I still have to generate a new release with other minor bug fixes.
Hi,
I think there's another issue with the getAllErrorMessages method of WebHook. I invoke it after a standard web hook creation:
Fair enough, I spotted this bug recently with an invalid hash ($hash) but I think the call to the method also failed with a valid hash.
FYI, here's the call stack on crash:
Any ideas on this one?
Thanks!