Problem with Forward Plugin
Lansoweb opened this issue · 1 comments
Lansoweb commented
Hi!
I'm playing with apigility and trying to use it with one of my project. But when i try to login in the system i receive the error:
Fatal error: Cannot use object of type ZF\ContentNegotiation\AcceptListener as array in xxx/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/Forward.php on line 179
the error occurs inside detachProblemListeners.
If i comment the attacing listener inside the onBootstrap (zfcampus/zf-content-negotiation/src/ZF/ContentNegotiation/Module.php:122) i can login but the api atops working (as expected).
Is there a workaround for this? Maybe Forward.php should check if the callback is in fact an array on line 179 (ZF2 2.2.5)? Something like:
if (!is_array($currentCallback) || !isset($currentCallback[0])) {
Thanks,
Leandro Silva
weierophinney commented
@Lansoweb This is really an issue for zendframework/zf2 -- can you post it there? The core of the problem is that the Forward plugin is not identifying all listeners properly.