FAQ
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

Search Discussions

  • Pierrick Charron at Jul 29, 2011 at 5:27 am
    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 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedJul 29, '11 at 12:57a
activeJul 29, '11 at 5:27a
posts2
users1
websitephp.net

1 user in discussion

Pierrick Charron: 2 posts

People

Translate

site design / logo © 2022 Grokbase