ciro
ciro

Reputation: 801

zend framework 2 do not catch all errors

Hello everyone I followed the instructions provided here

Zend framework 2 recommended way for error handling

to catch any errors that occur including notice

works fine for fatal errors and exceptions but for the notice. there is a way to capture them?

unfortunately I can not add comments to the discussion I mentioned and also two years old

thank you

Upvotes: 1

Views: 626

Answers (2)

magnetronnie
magnetronnie

Reputation: 505

I think you need a custom error handler for that. Have a look at this blog post: https://samsonasik.wordpress.com/2014/01/21/zend-framework-2-handle-e-php-error/

I'm not sure if this is the best example of an error handler, you might not want to send an e-mail every time something happens. But at least it will show you how to get one up and running in ZF2.

Upvotes: 2

Daniel Payne
Daniel Payne

Reputation: 125

Have you tried setting

error_reporting(E_ALL); 

or more preferably setting

error_reporting E_ALL & E_NOTICE & E_STRICT

in your php.ini file

Upvotes: 0

Related Questions