Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73823 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67563 invoked from network); 28 Apr 2014 09:07:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2014 09:07:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:46464] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/71-49136-C6A1E535 for ; Mon, 28 Apr 2014 05:07:57 -0400 Received: from [192.168.2.31] (ppp-188-174-52-123.dynamic.mnet-online.de [188.174.52.123]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id 090C64666D; Mon, 28 Apr 2014 11:08:47 +0200 (CEST) To: "php@thekid.de" Cc: internals@lists.php.net In-Reply-To: <1005082480.406481.1398600039315.open-xchange@email.1und1.de> References: <1005082480.406481.1398600039315.open-xchange@email.1und1.de> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-Y2myeg1vf+HwV/LxVuQA" Date: Mon, 28 Apr 2014 11:07:11 +0200 Message-ID: <1398676031.26923.36.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Subject: Re: [PHP-DEV] RFC: Catchable "call to a member function of a non-object" From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) --=-Y2myeg1vf+HwV/LxVuQA Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Sun, 2014-04-27 at 14:00 +0200, php@thekid.de wrote: > Hello everyone, >=20 > as per the RFC process I'd like to start a discussion on the RFC > I've put up on the RFC Wiki: >=20 > https://wiki.php.net/rfc/catchable-call-to-member-of-non-object > RFC: Catchable "call to a member function of a non-object", 1.0 >=20 > The essence of this pull request is that it converts this fatal error > into E_RECOVERABLE_ERRORs. Framework authors may choose to convert > these into exceptions, as they already do with argument type mismatches. The definition of E_ERROR is "an error where the engine can't fully recover", so if we can recover there should be no need for a vote ;-) But I have doubts whether this works reliably in all cases where functions are called. i.e. how will usort() behave? From a very quick grep it seems that i.e. sapi/phpdbg doesn't check the return value of zend_call_function, these things have to be reviewed too. Right now code (should not but) could rely on the engine doing a bailout which will shutdown the request on errors to call a function/method. johannes --=-Y2myeg1vf+HwV/LxVuQA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (SunOS) iQEcBAABAgAGBQJTXho/AAoJEH3sTmn8nIPXxOcH/jNwdvV2v15k0bsvp+mg7dlC HGD3cQUJa4h63o8hEisosbgBk0hUeCCknXMRlk9lBtsKtS/vepsZpFErD5RypPkf 8jcMLuPzJO214wAcCnz+x5fQMHAQPol8OITm6cCKdkATl4nN8RCPiSQpY4hPoAhF 4nTvOXv0aRj2f/AuioAcbbGrJlvrX/ceE7aT4rvNWvS2+IQlEN3QYStwNQG68EEb 2BTNhKR/J9NbGoyjkbBOU7Cs5+0a7HeNgvIqjvBG6Axuu66SOAUbyYTMlHE/91RC 0MbGNnIikdhBSqTxHSgh22fmkHlXQfT/w+G+SZaNBCiL3vCxILeMaumTkGYJrbI= =bDAt -----END PGP SIGNATURE----- --=-Y2myeg1vf+HwV/LxVuQA--