On 06/03/12 17:08, Alan Knowles wrote:
> I just got caught on a production server with the 5.4 upgrade on
> debian, pretty much everything works fine, except the E_ALL change.
>
> I have to admit I missed the discussion where it was added, and
> searching for E_ALL or E_STRICT on marc is pretty difficult (it
> removes the E_ bit..)
>
> Anyway, this change is a bit of an bomb on the code on the first
> server to get hit with this, While i've never cared for E_STRICT (it's
> more like E_ANAL) - most of the warnings are pointless code tidy up's
> that only have pretty much zero cost/return in fixing.
>
> However, this change really kills code written by third parties, All
> our servers run with E_ALL on (eg. E_NOTICE is printed to end users)
> and we fix instantly any errors that the end users see, as they are
> frequently issues that should have been addressed. These applications
> are intra/extranet apps, not public websites.
>
> However with E_STRICT included we have to run around and find all the
> code, and change it to stuff like this:
>
> error_reporting(E_ALL & E_STRICT ? E_ALL ^ E_STRICT : E_ALL);
error_reporting(E_ALL & ~E_STRICT); will work everywhere. You could even
do a global search and replace of E_ALL to (E_ALL & ~E_STRICT), assuming
it never appears in eg. a string.


PS: I also consider E_STRICT a mostly helpful resource, and not using
display_errors on production the sensible thing to do.


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to