Dmitry Stogov
ac6c88a4dc
Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP)
2005-08-04 10:35:37 +00:00
Dmitry Stogov
923ec1c813
Fixed bug #31158 (array_splice on $GLOBALS crashes)
2005-07-04 10:08:21 +00:00
Dmitry Stogov
d861d47034
Fixed bug #31213 (Sideeffects caused by fix of bug #29493 )
2005-06-21 12:10:59 +00:00
Dmitry Stogov
5eb5dfa536
Fixed memory allocation bugs in array_reduce() with initial value ( #22463 & #24980 )
2005-06-08 19:54:46 +00:00
Dmitry Stogov
abe7b677f3
Fixed call to estrndup() with invalid lengt
2005-04-25 06:11:00 +00:00
Antony Dovgal
4a23aa4535
MFH: fix #30833 (array_count_values modifying input array)
2005-04-12 14:01:06 +00:00
Andrey Hristov
e8c97542bf
Fixed #30871
2005-03-12 10:12:49 +00:00
Derick Rethans
f06bb200e5
- MFH: Fixed bug #32021 : Crash caused by range('', 'z')
2005-02-18 13:39:44 +00:00
Rob Richards
0542a6f2c2
MFH: fix segfault in array_walk when retval_ptr is empty
...
- such as when exception thrown
2005-02-10 23:00:53 +00:00
Stanislav Malyshev
4e1e2eadec
fix leak if function call fails
2005-02-02 10:24:50 +00:00
Antony Dovgal
39acd18e4b
MFH: destroy return_value and fix leak in array_fill()
2004-12-23 16:38:13 +00:00
Antony Dovgal
f5223ff699
MFH: fix leak (init array only if we got valid start key)
2004-12-16 19:20:54 +00:00
Antony Dovgal
125c9028a7
MFH: fix array_walk_recursive() so it doesn't reuse cached fci between calls
...
and add test for it
2004-12-03 17:51:17 +00:00
Antony Dovgal
0cb5aa2d53
MFH: revert my last patch
2004-12-02 16:36:00 +00:00
Antony Dovgal
61e2b771d4
MFH: fix #29954 (array_reduce segfaults when initial value is array)
2004-11-28 17:04:18 +00:00
Antony Dovgal
bb7515902c
MFH: fix bug #30587 (array_multisort doesn't separate zvals before changing them)
2004-11-19 16:57:06 +00:00
Derick Rethans
9782bbd297
- MFH: Added new boolean (fourth) parameter to array_slice() that turns on the
...
preservation of keys in the returned array.
2004-09-15 11:51:56 +00:00
Derick Rethans
7d77171b9b
- Added the sorting flag SORT_LOCALE_STRING to the sort() functions which makes
...
them sort based on the current locale. (Derick)
2004-09-11 14:20:55 +00:00
Ilia Alshanetsky
255f9fc072
MFH: Fixed bug #29808 (array_count_values() breaks with numeric strings).
2004-08-26 00:26:22 +00:00
Moriyoshi Koizumi
1c6896076f
- Bugfix #29493 (extract(array, EXTR_REFS) misbehaves with elements referred
...
twice or more times)
2004-08-10 06:01:20 +00:00
Ilia Alshanetsky
d976c362ac
MFH: Fixed but #29437 (Possible crash inside array_walk_recursive()).
2004-07-29 00:35:12 +00:00
Andrey Hristov
0eef82a733
fixing bug #28974 : overflow in array_slice()
...
The same kind of overflow appeared in array_splice(), substr() and
substr_replace()
2004-07-11 21:15:04 +00:00
Andrey Hristov
268d3d7ba3
fixing bug #28739
...
array_*diff() and array_*intersect() not clearing the fci cache before work.
FCI call cache was introduced in HEAD. All functions that perform sorting
of arrays clear the fci cache before work. array_*diff() and\ array_*intersect()
were somehow missed to be updated.
2004-07-11 19:20:05 +00:00
Andrey Hristov
7af08c0c34
fixing bug 29038:
...
EXTR_PREFIX_SAME is prevented from creating a new variable when the key
is a empty string. EXTR_PREFIX_ALL is also prevented from doing that,
but works for numbers.
2004-07-11 18:18:05 +00:00
Ilia Alshanetsky
4ebcb2ecfe
Fixed bug #29008 (array_combine() does not handle non-numeric/string keys).
2004-07-11 15:23:57 +00:00
Ilia Alshanetsky
79c28f7618
Fixed bug #29049 (array sorting via user function/method does not validate
...
it).
2004-07-08 17:07:22 +00:00
Wez Furlong
263723ec9b
Update for count_elements handler for overloaded objects.
2004-05-04 15:03:48 +00:00
Ilia Alshanetsky
c85843aec1
MFB: Revert patch for bug #27782 .
2004-04-01 22:07:42 +00:00
Ilia Alshanetsky
ec4655f864
Fixed bug #27782 (Wrong behaviour of next(), prev() and each()).
2004-03-30 19:08:43 +00:00
Andrey Hristov
eaab3ef8cd
this should not belong to HEAD
2004-01-28 20:25:30 +00:00
Andrey Hristov
9957fc6305
Added third parameter (optional) to array_keys for strictness. It behaves
...
like the "strict" parameter of in_array().
#Closing feature request #24258
2004-01-24 00:25:58 +00:00
Andrey Hristov
9e5df0c666
HEAD is now bundled only with ZE2
2004-01-17 17:33:11 +00:00
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
2004-01-08 08:18:22 +00:00
Andrey Hristov
638b940307
New array functions for doing intersection of arrays that are complementary
...
to array_*diff* family of functions. Namely array_uintersect(), array_uintersect_assoc(),
array_intersect_uassoc() and array_uintersect_uassoc(). Test case is also included.
#docs and news entry later.
2003-10-09 08:10:39 +00:00
Ilia Alshanetsky
31a3c87159
Fixed clobbering of the source array, when merging complex
...
multi-dimensional arrays. Bug reported by Lukas Smith.
2003-10-05 19:37:02 +00:00
Moriyoshi Koizumi
75bb36ed09
Fixed bug #25708 (extract($GLOBALS, EXTR_REFS) mangles $GLOBALS)
2003-10-02 22:20:48 +00:00
Andrey Hristov
40088d0bbc
smash a segmentation fault
2003-09-30 15:00:36 +00:00
Andrey Hristov
02827c46be
Memory leak fixed (no need of MFH since this is code specific to PHP5)
2003-09-30 12:43:58 +00:00
Hartmut Holzgraefe
075e66cc08
signed/unsigned compiler warning fixes
2003-09-26 08:09:56 +00:00
Ilia Alshanetsky
6966350013
Fixed typo.
2003-09-26 00:40:32 +00:00
Andrey Hristov
3579f212df
4 new functions :
...
array_udiff()
array_udiff_assoc()
array_diff_uassoc()
array_udiff_uassoc()
They work like array_diff() or array_diff_assoc() but callback function(s)
can be used to perform the comparisons. For example array_udiff_uassoc()
expects 2 callbacks are last 2 parameters one is used to compare the values
of the entries in the arrays the second to compare the keys.
Class methods are also valid callbacks. Even when the data that should be
used in the comparison is private or protected then a static method of a
class should be used (this behaviour can be seen in the regression test -
007.phpt).
2003-09-23 17:37:29 +00:00
Andrey Hristov
63d7df3e2f
improve the fix for #25494 . If more then one bad parameter is passed
...
an warning for all will be emitted.
2003-09-22 23:19:17 +00:00
Jay Smith
6c6fd76bac
Fixed bug #25494 (array_merge allowing "false" as argument (silent when
...
non-array is passed))
# 4.3 throws E_NOTICEs, 5 errors out on non-array args as per Ilia's
# suggestion.
2003-09-11 17:40:18 +00:00
foobar
8733d2dacb
revert that, it did not fix anything
2003-08-13 01:37:31 +00:00
foobar
0ee19d47d9
Fix external builds (configure run outside srcdir)
2003-08-13 01:24:27 +00:00
Ilia Alshanetsky
ed40ae2650
emalloc -> safe_emalloc
2003-08-11 23:16:54 +00:00
Ilia Alshanetsky
e5b7d5ccb4
Fixed bug #24897 (inconsistent behavior of shuffle() & array_multisort())
2003-08-09 20:49:00 +00:00
Ilia Alshanetsky
e49964fe99
Do not assume array contains numeric values.
2003-08-09 16:43:28 +00:00
Ilia Alshanetsky
a2873880f6
Fixed bug #24980 (array_reduce() uses first element as default running
...
total).
Fixed memory leak that can be replicated using the function example on
http://www.php.net/array_reduce
2003-08-08 23:50:36 +00:00
Zeev Suraski
90b29aa076
Replace fast_call_user_function() with zend_call_function()
2003-08-05 10:29:03 +00:00