Edit report at https://bugs.php.net/bug.php?id=50816&edit=1
ID: 50816
Patch added by: laruence@php.net
Reported by: spasic dot dejan at yahoo dot de
Summary: Using class constants in array definition fails
(works in PHP_5_2)
Status: Verified
Type: Bug
Package: Scripting Engine problem
Operating System: *
PHP Version: 5.3, 6
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: bug50816.patch
Revision: 1312041987
URL: https://bugs.php.net/patch-display.php?bug=50816&patch=bug50816.patch&revision=1312041987
Previous Comments:
------------------------------------------------------------------------
[2011-07-30 15:41:20] laruence@php.net
I use ht->pListHead to traverse the elements in array , to find out who come
first.
that should make the code more clearly.
patch submitted.
------------------------------------------------------------------------
[2011-07-30 15:24:43] laruence@php.net
The following patch has been added/updated:
Patch Name: bug50816.patch
Revision: 1312039483
URL: https://bugs.php.net/patch-display.php?bug=50816&patch=bug50816.patch&revision=1312039483
------------------------------------------------------------------------
[2011-07-29 14:32:16] pierrick@php.net
This bug 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.
Any other idea is welcome
------------------------------------------------------------------------
[2011-07-29 14:30:24] pierrick@php.net
The following patch has been added/updated:
Patch Name: 50816-2.diff
Revision: 1311949824
URL: https://bugs.php.net/patch-display.php?bug=50816&patch=50816-2.diff&revision=1311949824
------------------------------------------------------------------------
[2011-07-29 04:14:28] pierrick@php.net
The following patch has been added/updated:
Patch Name: 50816-2.diff
Revision: 1311912867
URL: https://bugs.php.net/patch-display.php?bug=50816&patch=50816-2.diff&revision=1311912867
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=50816--
Edit this bug report at https://bugs.php.net/bug.php?id=50816&edit=1