Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-07 Thread Daniel K.
On 10/07/2011 10:04 AM, Pierre Joye wrote: > especially when it is only about fixing a strict warning. It's not _just_ about silencing a strict warning. It's about preventing non-obvious fuck-ups in extensions as well, as I alluded to earlier in the thread. Consider an extension implementing a fu

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-07 Thread Stas Malyshev
Hi! On 10/6/11 5:59 PM, Daniel K. wrote: But what about 5.3? there is no ABI issue with this, just a spurious warning that goes away. Yeah, I agree with Pierre - it's not a huge problem, and the risk is there, so I'd hold it for 5.3 as it is the stable version. When 5.4 gets tested enough th

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-07 Thread Pierre Joye
hi, 2011/10/6 Johannes Schlüter : > I think 5.3 is fine, too. But please extend the test a bit. The current > one will pass even if the process segfaults. At least print something at > the end. I think it is not safe for 5.3. While the patch looks trivial or harmless, it is in an area where the

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-06 Thread Daniel K.
On 10/06/2011 06:15 PM, Johannes Schlüter wrote: > But please extend the test a bit. The current > one will pass even if the process segfaults. At least print something at > the end. Ah, so that's why some of the tests have 'echo "DONE";' at the end. New test-case uploaded, and attached. Daniel

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-06 Thread Daniel K.
On 10/06/2011 06:03 PM, Etienne Kneuss wrote: > On Thu, Oct 6, 2011 at 17:31, Daniel K. wrote: >> 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 thos

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-06 Thread Johannes Schlüter
On Thu, 2011-10-06 at 17:59 +0200, Daniel K. wrote: > On 10/06/2011 05:55 PM, Stas Malyshev wrote: > > On 10/6/11 5:31 PM, Daniel K. wrote: > >> 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

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-06 Thread Daniel K.
On 10/06/2011 05:55 PM, Stas Malyshev wrote: > On 10/6/11 5:31 PM, Daniel K. wrote: >> 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. >> >> https://bugs.php.net/bug.p

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-06 Thread 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 parameter. >> >> As an example, current() show this behaviour. >> >

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-06 Thread Stas Malyshev
Hi! On 10/6/11 5:31 PM, Daniel K. wrote: 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. https://bugs.php.net/bug.php?id=55754 The patch still applies to trunk, and

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-10-06 Thread Daniel K.
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 parameter. > > As an example, current() show this behaviour. > > current($foo = array("bar")); > ?> > > Presents you wit

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-09-23 Thread Daniel K.
On 09/23/2011 03:41 PM, Daniel K. wrote: > On 09/23/2011 02:28 PM, Etienne Kneuss wrote: >> On Fri, Sep 23, 2011 at 14:06, Daniel K. 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 parameter. >

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-09-23 Thread Tjerk Meesters
Hi, Ran into this exact issue just the other day. In the pre-5.4 days, to get the first element of a returned array I would use current(). I still think that's correct and shouldn't raise a digital eyebrow. On Sep 23, 2011 8:30 PM, "Etienne Kneuss" wrote: > Hi, > > On Fri, Sep 23, 2011 at 14:06,

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-09-23 Thread Daniel K.
On 09/23/2011 02:28 PM, Etienne Kneuss wrote: > On Fri, Sep 23, 2011 at 14:06, Daniel K. 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 parameter. > > The patch looks strange to me, why would y

Re: [PHP-DEV] [PATCH] Fix for bug #55754

2011-09-23 Thread Etienne Kneuss
Hi, On Fri, Sep 23, 2011 at 14:06, Daniel K. 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 parameter. > > As an example, current() show this behaviour. > > current() has this arginfo defined: >