diff options
| author | Hannes Magnusson <bjori@php.net> | 2006-11-12 01:14:39 +0000 |
|---|---|---|
| committer | Hannes Magnusson <bjori@php.net> | 2006-11-12 01:14:39 +0000 |
| commit | 7b81e554aee33e24b8a4dda917e0a6c5fc4707d9 (patch) | |
| tree | 2e8222dd322058b9af58410d622bb06ccf2d5925 /ext/standard/array.c | |
| parent | 7d75155e01a926d222843894a7b06e24378b02fd (diff) | |
| download | php-git-7b81e554aee33e24b8a4dda917e0a6c5fc4707d9.tar.gz | |
MFH: Fixed bug#36975 (natcasesort() causes array_pop() to misbehave)
Diffstat (limited to 'ext/standard/array.c')
| -rw-r--r-- | ext/standard/array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 05f234382e..062d49509d 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2033,7 +2033,7 @@ static void _phpi_pop(INTERNAL_FUNCTION_PARAMETERS, int off_the_end) if (should_rehash) { zend_hash_rehash(Z_ARRVAL_PP(stack)); } - } else if (!key_len) { + } else if (!key_len && index >= Z_ARRVAL_PP(stack)->nNextFreeElement-1) { Z_ARRVAL_PP(stack)->nNextFreeElement = Z_ARRVAL_PP(stack)->nNextFreeElement - 1; } |
