Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38347 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85463 invoked from network); 18 Jun 2008 12:03:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jun 2008 12:03:45 -0000 Authentication-Results: pb1.pair.com header.from=lists@chsc.dk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lists@chsc.dk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain chsc.dk designates 80.160.77.98 as permitted sender) X-PHP-List-Original-Sender: lists@chsc.dk X-Host-Fingerprint: 80.160.77.98 pasmtpb.tele.dk Linux 2.5 (sometimes 2.4) (4) Received: from [80.160.77.98] ([80.160.77.98:39643] helo=pasmtpB.tele.dk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/1D-03518-0A9F8584 for ; Wed, 18 Jun 2008 08:03:45 -0400 Received: from zimbra.peytz.dk (unknown [62.243.131.42]) by pasmtpB.tele.dk (Postfix) with ESMTP id E6AB4E31150 for ; Wed, 18 Jun 2008 14:03:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.peytz.dk (Postfix) with ESMTP id 026D5130DC8 for ; Wed, 18 Jun 2008 14:03:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at X-Spam-Flag: NO X-Spam-Score: -4.399 X-Spam-Level: X-Spam-Status: No, score=-4.399 tagged_above=-10 required=5 tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599] Received: from zimbra.peytz.dk ([127.0.0.1]) by localhost (zimbra.peytz.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pqOo7CQts7Fh for ; Wed, 18 Jun 2008 14:03:43 +0200 (CEST) Received: from [192.168.10.188] (unknown [192.168.10.188]) by zimbra.peytz.dk (Postfix) with ESMTP id 5CB41130DC7 for ; Wed, 18 Jun 2008 14:03:43 +0200 (CEST) Message-ID: <4858F99D.60700@chsc.dk> Date: Wed, 18 Jun 2008 14:03:41 +0200 User-Agent: Thunderbird 3.0a2pre (Windows/2008061503) MIME-Version: 1.0 To: php-dev List References: <4858B5EC.90109@lsces.co.uk> In-Reply-To: <4858B5EC.90109@lsces.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Selectable error messages From: lists@chsc.dk (Christian Schmidt) Lester Caine wrote: > Short of switching display_errors on and off all the time, how do other > people handle this irritation? I don't have experiences with E_DEPRECATED, but for E_STRICT we use a custom error handler to surpress strict errors in external libraries. Not all E_STRICT errors can be caught in this way, especially not if you are using an opcode cache. Our error handler looks like this, perhaps you can do something similar for E_DEPRECATED.: if (!($errorNumber & error_reporting()) || $errorNumber == E_STRICT && (strpos($fileName, '/pear/') !== false || strpos($fileName, '/smarty/') !== false || preg_match('/^Non-static method (DB|HTTP|Mail_RFC822|PEAR)::/', $message))) { if ($errorNumber & (E_ERROR | E_RECOVERABLE_ERROR | E_USER_ERROR)) { exit; } return; } // Show error message etc. Christian