ZF2-541: Zend\Log\Writer\Stream cannot be used in error handlers


If you build a \Zend\Log\Logger that uses a Zend\Log\Writer\Stream to write to a file and register it as the logger in \Zend\Log\Logger::registerErrorHandler you end having a bad error_handler since doWrite in Zend\Log\Writer\Stream uses Zend\StfdLib\ErrorHandler to catch error generated by fwrite. As Zend\StfdLib\ErrorHandler also registers an error_handler you end up trying to call restore_error_handler() from an error_handler function, which according to… is impossible.

I will make a pull request on github including a test case and a possible fix.


This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: