Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55709 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82320 invoked from network); 6 Oct 2011 16:03:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Oct 2011 16:03:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:52308] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/00-16264-F31DD8E4 for ; Thu, 06 Oct 2011 12:03:13 -0400 Received: by bkar4 with SMTP id r4so3659159bka.29 for ; Thu, 06 Oct 2011 09:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=q7/ntiA4ZLtsfvCXN+2JOkwj01PUCN1GvcuBowYf3VU=; b=RHjNn/cC/YV4YQ24xixNiqLOv6jsnoRYYDh1k7RTUftPqxGgAqaEYdd39PiHO+vzlT fn/Pbx1U3Ne1D5nj5RQnptfvVPIFCuPE+AvwhUYCeNPos3uON9CObCLtgeV5VmvV6rxn bRxJgIfhduwvzNOkC7WCHtF1BhYfVlQdYzgTA= MIME-Version: 1.0 Received: by 10.204.129.142 with SMTP id o14mr711886bks.233.1317916984031; Thu, 06 Oct 2011 09:03:04 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.204.59.68 with HTTP; Thu, 6 Oct 2011 09:03:03 -0700 (PDT) In-Reply-To: <4E8DC9B4.7040809@uw.no> References: <4E7C764C.3000808@uw.no> <4E8DC9B4.7040809@uw.no> Date: Thu, 6 Oct 2011 18:03:03 +0200 X-Google-Sender-Auth: cWiHX-hTTWbSUCysaQ2yK33hhF0 Message-ID: To: "Daniel K." Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH] Fix for bug #55754 From: colder@php.net (Etienne Kneuss) Hi, On Thu, Oct 6, 2011 at 17:31, Daniel K. wrote: > On 09/23/2011 02:06 PM, I wrote: >> When a built-in function is defined with ZEND_SEND_PREFER_REF, PHP will >> issue a strict warning if you use an assignment expression as the parame= ter. >> >> As an example, current() show this behaviour. >> >> > current($foo =3D array("bar")); >> ?> >> >> Presents you with: >> >> PHP Strict Standards: =C2=A0Only variables should be passed by reference= in >> %s on line %d > > A patch was appended, discussed, and improved, and I have uploaded a > test-case, as well as a minimal patch that fixes the problem (attached) > to the original bug-report. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0https://bugs.php.net/bug.php?id=3D55754 > > The patch still applies to trunk, and I think it should be applied to > the 5.3 and 5.4 branches as well. The new patch seems to be indeed better. My only concern is whether it covers all those cases now. Did you try passing all possible kinds of value expressions ? Or is it guaranteed to cover all cases by design? If not, we should probably add more of those cases in the tests. Other than that, this looks fine. > > What to do next? > > The feedback has been constructive, but I feel it has stagnated a bit. > Of course, you may all be busy with other interesting stuff, but is > there anything else you require from me to get this rolling? > > Should I explain better why I think it's an issue, and why the patch is > needed? > > An indication as to if anyone is reviewing the proposed patch, and > considering applying it, or telling me that this is the completely wrong > approach to solve the problem and dropping a few hints would be most > appreciated, but any feedback is welcome. > > > Daniel K. > --=20 Etienne Kneuss http://www.colder.ch