FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Never log deprecation warnings
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Never log deprecation warnings [message #179038 is a reply to message #179037] Thu, 06 September 2012 16:33 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
J.O. Aho wrote:
> On 06/09/12 15:48, Thomas 'PointedEars' Lahn wrote:
>> Jonathan Stein wrote:
>>
>>> Does anyone have an idea about how to never log deprecation warnings -
>>> even if the code alters error_reporting?
>>>
>>> I'm thinking about setting "php_flag log_errors off" in .htaccess to
>>> block all error logging, but I would prefer to log real errors.
>>
>> You could set `error_reporting' to something that includes `&
>> ~DEPRECATED'
>> (and code that alters error-reporting in more than one place, except for
>> debugging purposes, is potentially bad code anyway), but …
>>
>>> (And no, avoiding deprecated functions is not an option in this case).
>>
>> … I strongly suggest you fix the code instead. Why is that IYHO not an
>> option in this case?
>>
>> If you do not fix deprecated code now, it will be a real error in one
>> of the
>> next PHP versions. Upgrading PHP to that version will cause your
>> application to break. Not upgrading to it will cause your application
>> to be
>> inherently insecure as you would not get all the security fixes. You
>> do not
>> want any of that to happen.
>
> Of course they could try to stick to the current version of PHP on the
> server, but of course then they will be stuck with all the security
> issues which may be in the PHP (we seen a number of such this year) or
> try to bakcport fixes to the PHP source code and build it.
>
> Of course the absolute simplest thing to do is to fix the PHP scripts,
> have to agree with Thomas and Jerry on this one.
>
yeah. One day I'll have to plough through mine and replace all the

if ($_POST[....) with
if (isset($_POST[...) && $_POST[...))

and lower the error logs by a couple of hundred bytes a day.

But meanwhile I think I'll make myself a coffee and a cheese sandwich.


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how format one date
Next Topic: Problem with PHP Driver Authentication
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 16:49:53 GMT 2024

Total time taken to generate the page: 0.04408 seconds