The submit handler uses the message from the reply from the API, but if it fails badly enough, an exception is thrown and Apsis::request() returns nothing.

But SubscribeForm::submitForm() uses the return value of Apsis::addSubscriber() without checking if it's actually an object.

In general, it's not a good idea to let the methods on Apsis return the API response rather than a specific data structure.

Comments

Xen created an issue. See original summary.

xen’s picture

xen’s picture

Status: Active » Closed (outdated)