Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51085 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8117 invoked from network); 19 Dec 2010 10:03:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2010 10:03:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.177 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.216.177 mail-qy0-f177.google.com Received: from [209.85.216.177] ([209.85.216.177:56853] helo=mail-qy0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/38-35939-068DD0D4 for ; Sun, 19 Dec 2010 05:03:13 -0500 Received: by qyk27 with SMTP id 27so1929288qyk.8 for ; Sun, 19 Dec 2010 02:03:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=G5mKMV7ppHCkQgFOBImhbEBZF6hPgqtlVkMRIH2zpjk=; b=VtHFl0GnrnZqtStZMDSM3djfPedySMtlkcp0mUxWLyOSGkK7O3UEX4T6WV5yjT15AJ iFcEtgfVjM9sqQOhqDzQGECa1UvvmUsiKb/337hEWXSLJJOPoDmEGXeQDyZGtWTx7qF0 BZMkqhVsMIxcqkCnGAwxBQJMYAxp17PNTfQGE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=pphNLyafAqtmq03LlAjPqUTTZWc975i3C3bfLqjxhz9wxBmSCKIer0F+Eqal58ResY bGL6UTierJhbsGzKjMZ3cuUrTUzfgOJisItNew/+MWTxfna/Q1DI/P8OjzGUm9Bjtr61 j+K6bv/RUPJ599f6cQow3CE9LTEyTs6e8v91s= MIME-Version: 1.0 Received: by 10.229.220.134 with SMTP id hy6mr2619330qcb.287.1292752989697; Sun, 19 Dec 2010 02:03:09 -0800 (PST) Received: by 10.229.186.200 with HTTP; Sun, 19 Dec 2010 02:03:09 -0800 (PST) In-Reply-To: <4D0DD6DF.4020006@sugarcrm.com> References: <4D0D7CA1.8030200@sugarcrm.com> <4D0DD6DF.4020006@sugarcrm.com> Date: Sun, 19 Dec 2010 11:03:09 +0100 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [path] fixing errors, take 2 From: hannes.magnusson@gmail.com (=?ISO-8859-1?Q?Hannes_Magn=FAsson?=) On Sun, Dec 19, 2010 at 10:56, Stas Malyshev wrote: > Hi! > >> AFAICT from the patch.. >> if (@strpos()) {} else { var_dump(error_get_last()); } >> will give you the last error that happened before strpos()? > > Hmm... that unfortunately depends on ignore_repeated_errors, I didn't see > this use case. With error_get_last() we probably can't fix it since it > requires storing full error message for every error. That kind of sucks :( I like the idea behind the patch, and I cannot think of a clean way around the error_get_last() problem. error_get_last() also has issues with user defined error handler, so I suppose we should just document it properly.. -Hannes