Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94304 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69697 invoked from network); 28 Jun 2016 16:44:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jun 2016 16:44:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.89 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.89 mx108.easyname.com Received: from [77.244.243.89] ([77.244.243.89:60518] helo=mx204.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/14-41838-B69A2775 for ; Tue, 28 Jun 2016 12:44:28 -0400 Received: from cable-81-173-134-219.netcologne.de ([81.173.134.219] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bHw7a-0003DV-VG; Tue, 28 Jun 2016 16:44:23 +0000 Reply-To: internals@lists.php.net References: <2c547cd2-408d-238b-2b5c-e6f7f24f0e7a@fleshgrinder.com> To: Stanislav Malyshev , internals@lists.php.net Message-ID: Date: Tue, 28 Jun 2016 18:43:49 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8sTD5nwGiFJcAcTtr01DOk5MQhVj7BjwV" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] [RFC DISCUSSION] Error Storage Behavior From: php@fleshgrinder.com (Fleshgrinder) --8sTD5nwGiFJcAcTtr01DOk5MQhVj7BjwV Content-Type: multipart/mixed; boundary="r9EGaN3o8ilXLUdaUIl6kXwGNr36gx9OF" From: Fleshgrinder Reply-To: internals@lists.php.net To: Stanislav Malyshev , internals@lists.php.net Message-ID: Subject: Re: [PHP-DEV] [RFC DISCUSSION] Error Storage Behavior References: <2c547cd2-408d-238b-2b5c-e6f7f24f0e7a@fleshgrinder.com> In-Reply-To: --r9EGaN3o8ilXLUdaUIl6kXwGNr36gx9OF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/27/2016 9:53 PM, Stanislav Malyshev wrote: > Hi! >=20 >> Currently error_get_last() always contains the last error that occurre= d, >> however, this is actually not desired if the last error was an excepti= on >> that was caught. >> >> https://github.com/php/php-src/pull/1936 >=20 > I think conditioning warnings on whether exception is caught or not is = a > very bad idea. However, having _either_ exception _or_ PHP error and no= t > producing both (except in the case where uncaught exception becomes > fatal error I guess) may be a good idea, but it needs careful checking > of the implications. In general, old error mechanism and exceptions are= > not very good combination, and using them together may be troublesome. >=20 > It's definitely not "just a bug fix" - it needs careful check of what > exactly happens when. >=20 This is exactly how I see this situation too and why I mailed the list while asking for feedback. I think the actual problem from the bug report is not related to the provided patch that I updated a bit, the problem is as far as I can tell within the DateTime::__construct method were the error mode is changed to E_THROW but upon throwing a warning is generated as well. I had a look at other implementations that change the mode but they did not behave the same. I am not familiar enough with all the code yet to simply point out what is actually wrong but will definitely invest more time unless somebody else who knows more does and simply fixes it. --=20 Richard "Fleshgrinder" Fussenegger --r9EGaN3o8ilXLUdaUIl6kXwGNr36gx9OF-- --8sTD5nwGiFJcAcTtr01DOk5MQhVj7BjwV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXcqlNAAoJEOKkKcqFPVVrIBQQAIhH4vJvqR13olG4ygi7Bdg2 Mj3rkXYGbDsvswp0K7+0F7XdUDjEIcg5q85lql2PDzVtelvpXK/N/JzQxt2hu8Zl cC6s2RyatHI1VdWH+yyeKsJywGAjWBNCAwE/Hl4YdAhtE3Tft0vdfngxRltuYOaz HR7VbJdhxn75gD+f5YE5CPlcATVQFSEJf/dmUEywjDeVfGwV5xw0wmOTOJ7+N0fY uZVgzCnqfLGdbvSAXgfexwmjIF8BDF29awZMfMCJx8gZcK/Q4nCZ1DR5I4BOadXG gBDAEv6emaBKG60txv6dvacIGt2nklXuT/OfDz0125bGh9UxAAuqAP00KYS+8+LP spzhFhiBqbI0ZGINTlADA/Bns+ChAlJR/55SUHg+0HUIZzIs/qHiqWYODSRejT/X bdf4g3paVHA0abfUMVamjoQ9MeLC7gwzXANsSyN+/JvZK5v2JlzAxXb+ymfrJjeR dWRHsZugCyfhzKD8VMT8ClKiRwXOR/z3p+H/1icLCKzwvV5GrpJdO3u1efLrB2Ou 1mPFOZdeMTpSVsRgPSzS0xs66TuxkBDXbetX4rntpvvJU/EhHkuzM+0qDwRwZ3z9 /lHegdYBxpe6b+hYIIpiUG6UYBFLEn2tf+qMhrYYyH6azf1BMZ2QOSSfYU9wCAmb qG8+7s+/bOU+K9usrXRz =AYAO -----END PGP SIGNATURE----- --8sTD5nwGiFJcAcTtr01DOk5MQhVj7BjwV--