Re: How to ignore E_STRICT and E_NOTICE with error_handler callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Dan Rossi <php@xxxxxxxxxxxxxxxx>:
> already have i was hoping to avoid the if's. E_STRICT was throwing a 
> heap of suggestions for pear packages code ;)

So turn off error reporting for those levels:

    error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);


> On 18/04/2005, at 6:44 PM, Marek Kilimajer wrote:
>
> > php@xxxxxxxxxxxxxxxx wrote:
> > > Hi there i have an error handler callback within an error class which 
> > > is
> > > also being used for pear errors. E_NOTICE and E_STRICT are still 
> > > triggering
> > > this callback method, so i have to make a check that the code is not 
> > > one of
> > > these. I have error_reporting to ignore both of these and still no 
> > > luck,
> > > any ideas ?
> >
> > put this at the top of the error handling function:
> >
> > if($errno == E_STRICT || $errno == E_NOTICE) return;

-- 
Matthew Weier O'Phinney           | WEBSITES:
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org
mailto:matthew@xxxxxxxxxx         | http://vermontbotanical.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux