Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: Never log deprecation warnings Date: Thu, 06 Sep 2012 18:04:38 +0200 Lines: 36 Message-ID: References: <5048723b$0$293$14726298@news.sunsite.dk> <1971504.EYt92dMKsL@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net Uji2HqVUO+jeIv/rpMF/bAU1HjXJaN7X5XeHiqPbofGT1qGq1AoGBskMnSlxmdwhVa Cancel-Lock: sha1:HHBBDrUh1o4A+3VZB+j7wDYuVno= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120807 Thunderbird/14.0 In-Reply-To: <1971504.EYt92dMKsL@PointedEars.de> Xref: csiph.com comp.lang.php:6964 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. -- //Aho