1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Commit Graph

288 Commits

Author SHA1 Message Date
Stanislav Malyshev 7b241027fa fix memory leak if function call fails 2005-02-02 10:37:50 +00:00
Antony Dovgal 38d8e20f68 destroy return_value and fix leak in array_fill() 2004-12-23 16:35:48 +00:00
Antony Dovgal 33c24b5436 fix leak (init array only if we got valid start key) 2004-12-16 19:13:58 +00:00
Antony Dovgal b6b8bf0010 fix array_walk_recursive() so it doesn't reuse cached fci between calls
and add test for it
2004-12-03 17:43:23 +00:00
Antony Dovgal ccc6462cc5 revert my previous patch as it breaks more than fixes 2004-12-02 16:35:02 +00:00
Antony Dovgal dbc0bb7514 fix #29954 (array_reduce segfaults when initial value is array) 2004-11-28 17:03:45 +00:00
Antony Dovgal 2a588879ef fix bug #30587 (array_multisort doesn't separate zvals before changing them) 2004-11-19 16:55:37 +00:00
Marcus Boerger c18e248e60 - Remove doubled definition 2004-11-01 22:28:59 +00:00
Marcus Boerger b0c2af58f7 - Add some comment 2004-11-01 21:06:42 +00:00
Marcus Boerger 2ce7bcd742 - Allow direct access to spl class entries (SPL cannot be build shared) 2004-11-01 20:57:23 +00:00
Marcus Boerger db47e478c5 - Use new way for global variables
- Cache class lookup
2004-11-01 12:09:46 +00:00
Marcus Boerger 8e3a8b1e8e - Add interface Countable (PECL #30113) 2004-11-01 10:45:54 +00:00
Andi Gutmans 11bcaedfc8 - Rename delete_global_variable() to zend_delete_global_variable() 2004-10-04 20:17:06 +00:00
Andi Gutmans db507dd153 - Commit the variable fetch optimization.
- Extensions which delete global variables need to use new special function
- delete_global_variable() (I'm about to rename it) to remove them.
- Will post to internals@ or via commit messages if there's anything else.
2004-10-04 19:54:35 +00:00
Derick Rethans 7795da58e6 - Added new boolean (fourth) parameter to array_slice() that turns on the
preservation of keys in the returned array.
2004-09-15 11:50:27 +00:00
Derick Rethans 4bae5cb4d0 - MFB: 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:22:35 +00:00
Ilia Alshanetsky fe73e4d851 Fixed bug #29808 (array_count_values() breaks with numeric strings). 2004-08-26 00:26:19 +00:00
Andi Gutmans 0286913937 - Use FREE_HASHTABLE() 2004-08-12 06:17:42 +00:00
Moriyoshi Koizumi 51fc7b8ea5 - Bugfix #29493 (extract(array, EXTR_REFS) misbehaves with elements referred
twice or more times). (Patch inspired by Michael Manley. Thanks.)
2004-08-10 06:00:30 +00:00
Ilia Alshanetsky 739696d2d7 Fixed but #29437 (Possible crash inside array_walk_recursive()). 2004-07-29 00:35:07 +00:00
Andrey Hristov e64af9a898 proto fix
(thanks to dave%php.net for spotting)
2004-07-26 06:32:54 +00:00
Andrey Hristov d77a3f92e6 make behavior a bit field 2004-07-24 09:25:52 +00:00
Andrey Hristov 5e5d2640fb add array_:
intersect_key()
intersect_ukey()
diff_key()
diff_ukey()
The first two by a patch of Cristiano Duarte. The second two were
implemented in almost the same way except one small difference.
2004-07-21 21:17:56 +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