Major isssue with foreach() in PHP 4.3.10

php.internals

Jeremy Johnstone

21 years ago
http://bugs.php.net/bug.php?id=31134 This is breaking a large number of scripts.
-- --------------------------- Jeremy Johnstone http://www.jeremyjohnstone.com jsjohnst@php.net

Jeremy Johnstone

21 years ago
Found other bug report indicating this is a Zend Optimizer issue. IMHO, an announcement should be made on the homepage indicating if you upgrade to PHP 4.3.10 you should also make sure you upgrade Zend Optimizer. On Thu, 16 Dec 2004 13:53:39 -0600, Jeremy Johnstone <phpdev@gmail.com> wrote:
> http://bugs.php.net/bug.php?id=31134 > > This is breaking a large number of scripts. > > -- > --------------------------- > Jeremy Johnstone > http://www.jeremyjohnstone.com > jsjohnst@php.net >
-- --------------------------- Jeremy Johnstone http://www.jeremyjohnstone.com jsjohnst@php.net

Derick Rethans

21 years ago
On Thu, 16 Dec 2004, Jeremy Johnstone wrote:
> http://bugs.php.net/bug.php?id=31134 > > This is breaking a large number of scripts.
The bug you have there is a Zend optimizer bug as you conclude yourself. So why bother the mailinglist with it? And yes, there is another foreach bug of you do: foreach($array as $key => $key) Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Jeremy Johnstone

21 years ago
On Thu, 16 Dec 2004 22:00:11 +0100 (CET), Derick Rethans <derick@php.net> wrote:
> And yes, there is another foreach bug of you do: > > foreach($array as $key => $key)
As you mentioned in the bug report, IMHO that isn't a bug. I can't think of any instance where this should be a valid syntax (maybe I am not thinking creatively enough).
-- --------------------------- Jeremy Johnstone http://www.jeremyjohnstone.com jsjohnst@php.net

Derick Rethans

21 years ago
On Thu, 16 Dec 2004, Jeremy Johnstone wrote:
> On Thu, 16 Dec 2004 22:00:11 +0100 (CET), Derick Rethans <derick@php.net> wrote: > > And yes, there is another foreach bug of you do: > > > > foreach($array as $key => $key) > > As you mentioned in the bug report, IMHO that isn't a bug. I can't > think of any instance where this should be a valid syntax (maybe I am > not thinking creatively enough).
It's ofcourse totally silly code ;-) Also, this was already in 4.3.1, so no critical thing at all. Atlest it doesn't "leak" in 4.3.10... So the only bug with foreach was in combination with the Zend Engine AFAIK. Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Edin Kadribasic

21 years ago
> http://bugs.php.net/bug.php?id=31134 > > This is breaking a large number of scripts.
That's not a PHP bug. Its an issue with older versions of ZendOptimizer which is clearly stated in that bug report. Maybe we should print a warning on the download page since many PHP users seem to be experiencing it. Edin

Jeremy Johnstone

21 years ago
On Thu, 16 Dec 2004 22:08:24 +0100, Edin Kadribasic <edink@emini.dk> wrote:
> Maybe we should print a warning on the download page since many PHP users > seem to be experiencing it.
That was my suggestion too as no previous subminor version release of PHP broke like this due to a Zend extension not being upgraded. I would expect things like this to happen on an upgrade from 4.2 to 4.3, but not on an upgrade from 4.3.9 to 4.3.10. With statements like "several very serious security issues" on the homepage, many are going to be quick to upgrade and won't learn of the possible issues which could occur if they don't upgrade Zend extensions too. --------------------------- Jeremy Johnstone http://www.jeremyjohnstone.com jsjohnst@php.net