pMan
pMan

Reputation: 9158

Set custom error levels in zend framework

How can I set custom error levels with Zend Framework - say, I want to disable E_NOTICE.

Thanks.

Upvotes: 4

Views: 4032

Answers (3)

topolm
topolm

Reputation: 11

ZF 1.11, application.ini.

This works:

phpSettings.error_reporting = E_ALL ^ E_NOTICE

This won't work:

phpSettings.error_reporting = E_ALL^E_NOTICE
phpSettings.error_reporting = "E_ALL^E_NOTICE"

Upvotes: 0

kuko
kuko

Reputation: 21

In application.ini, this works:

phpSettings.error_reporting = E_ALL^E_NOTICE

This won't work:

phpSettings.error_reporting = "E_ALL^E_NOTICE"

Upvotes: 2

Benjamin Cremer
Benjamin Cremer

Reputation: 4822

If you are using Zend_Application put the following line into your application.ini

phpsettings.error_reporting = E_ALL & ~E_NOTICE

You can also use error_reporting() in your bootstrap like so:

error_reporting(E_ALL & ~E_NOTICE);

The error reporting levels a documented in the PHP manual.

Upvotes: 9

Related Questions