Re: Bug #50816

From: Date: Fri, 29 Jul 2011 05:27:41 +0000
Subject: Re: Bug #50816
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-54245@lists.php.net to get a copy of this message
Hi again, #50816 is due to the fact that the function zend_hash_update_current_key_ex try to determinate if an element of the array is before/after an other one with the new key by looking at their position in the Bucket. The problem is that the key of the element we want to change is not the same as the other one which mean they're not always in the same Bucket (almost never). The only solution I found was to determine which element is first by looping into the array itself element per element. I tried to optimise the patch by first making sure the second element exists so that I don't loop on the array for nothing. The "optimised" patch can be found here : http://www.adoy.net/php/50816-2.diff If someone has a better solution I'll be please to read it. Thanks Pierrick On 28 July 2011 20:57, Pierrick Charron <pierrick@webstart.fr> wrote: > Hi, > > I added a patch on #50816. I'm not sure the approach to fix this bug > is the best one so if someone can give me some feedback ? > > Thanks > Pierrick >

« previous php.internals (#54245) next »