Re: 4.3.2RC2: mul_function() Change Kills -1 As Parameter Default?
| From: | Wez Furlong | Date: | Fri, 02 May 2003 17:14:03 +0000 |
| Subject: | Re: 4.3.2RC2: mul_function() Change Kills -1 As Parameter Default? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1177@lists.php.net to get a copy of this message | ||
zend_multiply.h contains the fixed macro definition.
The problem was that the broken version incorrectly destroyed the
return_value when determining if promotion to float was required, in the
case that op1 == return_value.
--Wez.
On Fri, 2 May 2003, Michael Sisolak wrote:
> Wez,
>
> Can you point me in the right direction of the fix? The most recent
> version of zend_operators.c is in 4.3.2RC2, so the fix must be in some
> other file. I've dug around, but I can't figure out where it would be.
>
> Michael
>
> --- Wez Furlong <wez@thebrainroom.com> wrote:
> > Should be fixed already in CVS.
> >
> > --Wez.
> >
> > On Fri, 2 May 2003, Michael Sisolak wrote:
> >
> > > For me with 4.3.2RC2 (Win32 build) this code no longer works as it
> > > should:
> > >
> > > function test($param = -1)
> > > {
> > > echo $param;
> > > }
> > > test();
> > >
> > > Instead of printing -1, is prints 0 instead. I tracked this for a
> > > while through the code, and believe the problem is with the changes
> > > just introduced to mul_function() in zend_operators.c. I can't
> > follow
> > > it well enough to explain why, but if I revert to the php_4_3_2RC1
> > > version of mul_function() my test code works again.
> > >
> > > Michael Sisolak
> > > msisolak@gvpi.com