On Sun, Mar 18, 2012 at 4:53 PM, Lester Caine <les...@lsces.co.uk> wrote:
> Reindl Harald wrote: > >> >> Am 18.03.2012 10:14, schrieb Lester Caine: >> >>> > I think what I am probably looking for is a clean guide as to how >>> code SHOULD be written nowadays in order to avoid >>> > the nanny messages since it's certainly not my normal practice after >>> 10 years of coding in PHP5 ... >>> >> usually it would have been enough if you had used full error-reporting >> from very first start and fixed deprecated warnings long ago >> > The code IS running clean in PHP5.3 and we had this same discussion back > when all the deprecated warnings came in ... it took some months to get to > a point where the error log was clean again ... > > > this way i am maintaining a CMS with around 250000 LOC since 2003 >> and did every major PHP-upgrade wgere it is used and distributed on >> some hundret domains without any problem >> >> any code which does not run with E_STRICT is not allowed to >> run on our sevrvers and so the are no compromises needed >> yes, so easy is life if someone decides not support any crap >> > Ditto ... which is why the reams of new messages are what is somewhat > confusing. The code runs fine and switching off the warnings prevents the > logs growing at a rapid rate, > I'm happy to run with display_errors = on because if an error does crop up > we prefer to know about it fast. > > So I need to work out why with PHP5.4 we have such an overload of warning > messages ... so I CAN fix them ... which is why I'm asking here for advise > on migration information to a clean code base in PHP5.4 ... > > http://docs.php.net/manual/en/migration54.other.php - *E_ALL* now includes *E_STRICT* level errors in the error_reporting<http://docs.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting> configuration directive. I would guess your code was running clean, because you didn't have E_STRICT in your error_reporting, now in php 5.4, E_ALL includes that by default, and if you don't explicitly mask it, you will see those messages. -- Ferenc Kovács @Tyr43l - http://tyrael.hu