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

Issue Type: Bug Created: 2012-09-10T15:31:34.000+0000 Last Updated: 2012-10-08T20:16:32.000+0000 Status: Closed Fix version(s): Reporter: Franck STAUFFER (franckstauffer) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Log

  • zend-log

Related issues: Attachments:


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.


Posted by Ralph Schindler (ralph) on 2012-10-08T20:16:32.000+0000

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

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.