Commit Graph

289 Commits

Author SHA1 Message Date
Mike Willbanks
61099f8585 Bug #52861: unset fails with ArrayObject and deep arrays
When checking to make into a reference write, readwrite are checked but not unset
2013-02-26 22:11:52 -08:00
Stanislav Malyshev
0c6d903ce7 fix bug #49348 - issue notice on get_property_ptr_ptr when used for read 2013-02-18 20:56:02 -08:00
Nikita Popov
f540e086e2 Fixed bug #64106: Segfault on SplFixedArray[][x] = y when extended 2013-01-30 20:40:02 +01:00
Nikita Popov
bb4d11b405 Merge branch 'PHP-5.3' into PHP-5.4 2013-01-30 20:25:59 +01:00
Nikita Popov
321f4f18e5 Fixed bug #64106: Segfault on SplFixedArray[][x] = y when extended 2013-01-30 20:23:39 +01:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
a2045ff332 Happy New Year~ 2013-01-01 16:02:16 +08:00
Xinchen Hui
6284ef112e Fixed bug #63236 (Executable permission on various source files) 2012-10-09 13:28:31 +08:00
Xinchen Hui
e4a8fa6a15 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-09 13:29:51 +08:00
Xinchen Hui
f3108b5f81 Remove extra blank in notice message, should act as same as vm 2012-09-01 14:37:45 +08:00
Xinchen Hui
863e7e0acb Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	ext/spl/spl_array.c
2012-09-01 14:27:09 +08:00
Xinchen Hui
67d7d03f00 Fixed bug #62987 (Assigning to ArrayObject[null][something] overrides all undefined variables)
The get_zval_ptr_ptr of spl_array handler should act as same as the vm's
2012-09-01 14:21:34 +08:00
Xinchen Hui
8722173ad5 Implemented FR #62840 (Add sort flag to ArrayObject::ksort) 2012-08-21 13:32:15 +08:00
Stanislav Malyshev
a5d45bae85 Fixed bug #61527 (Recursive/ArrayIterator gives misleading notice when array empty or moved to the end) 2012-07-14 22:34:28 -07:00
Johannes Schlüter
b025b9d0cf Fix #62432 ReflectionMethod random corrupt memory on high concurrent
This fixes the same issue in multiple extensions. This isn't needed
in later branches as 5.4 introduced object_properties_init()
2012-06-27 23:26:33 +02:00
Nikita Popov
fed1f2d124 Fixed bug RecursiveArrayIterator does not implement Countable
ArrayIterator implemented Countable only after it was already inherited by
RecursiveArrayIterator. Thus the interface was missing in RAI.
2012-06-19 18:32:44 +02:00
Nikita Popov
cce4764f13 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug RecursiveArrayIterator does not implement Countable

Conflicts:
	ext/spl/spl_array.c
2012-06-19 18:08:22 +02:00
Nikita Popov
4cba4c6193 Fixed bug RecursiveArrayIterator does not implement Countable
ArrayIterator implemented Countable only after it was already inherited by
RecursiveArrayIterator. Thus the interface was missing in RAI.
2012-06-19 18:04:14 +02:00
Gustavo André dos Santos Lopes
593578c8c1 Merge branch '5.3' into 5.4 2012-03-28 13:06:05 +01:00
Gustavo André dos Santos Lopes
f07dd29fdc Fixed problem introduced in a763929 (fixing bug #61347).
The test added in 8c44c85 should now pass.
2012-03-28 13:04:41 +01:00
Xinchen Hui
430486f0bf Fixed bug #61347 (inconsist isset behavior of Arrayobject) 2012-03-11 08:27:55 +00:00
Xinchen Hui
a7639291b4 Fixed bug #61347 (inconsist isset behavior of Arrayobject) 2012-03-11 08:27:55 +00:00
Gustavo André dos Santos Lopes
88ba84fa7d - Fixed bug #61326 (ArrayObject comparison). 2012-03-10 17:19:39 +00:00
Gustavo André dos Santos Lopes
7bbf5fe650 - Fixed bug #61326 (ArrayObject comparison). 2012-03-10 17:19:39 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Antony Dovgal
c3b83e833d fix bug #60082 (Crash in ArrayObject() when using recursive references)
--Tis line, and those below, will be ignored--

M    trunk/ext/spl/spl_array.c
M    branches/PHP_5_4/ext/spl/spl_array.c
M    branches/PHP_5_3/ext/spl/spl_array.c
M    branches/PHP_5_3/NEWS
2011-11-18 05:22:35 +00:00
Antony Dovgal
ea97932279 fix bug #60082 (Crash in ArrayObject() when using recursive references)
--Tis line, and those below, will be ignored--

M    trunk/ext/spl/spl_array.c
M    branches/PHP_5_4/ext/spl/spl_array.c
M    branches/PHP_5_3/ext/spl/spl_array.c
M    branches/PHP_5_3/NEWS
2011-11-18 05:22:35 +00:00
Etienne Kneuss
bb7a93081e Fix CID 538/539, explicitely check for something that should never occur 2011-08-12 22:05:10 +00:00
Felipe Pena
23e438594d - Make usage of new PHP_FE_END macro 2011-07-25 11:42:53 +00:00
Felipe Pena
4b30846b50 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Dmitry Stogov
77ed819430 Fixed bug #54323 (Accessing unset()'ed ArrayObject's property causes crash) 2011-04-07 14:52:30 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Felipe Pena
9864040e35 - Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0 values) 2010-12-10 23:58:33 +00:00
Felipe Pena
13c99651fc - Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0 values) 2010-12-10 23:58:33 +00:00
Felipe Pena
6958cb4a14 - Added missing void arg checks 2010-11-14 18:40:08 +00:00
Felipe Pena
8192f0f771 - Added missing void arg checks 2010-11-14 18:40:08 +00:00
Michael Wallner
89e93723fb Added support for object references in recursive serialize() calls. FR #36424 2010-05-26 07:24:37 +00:00
Dmitry Stogov
c5237d82bf Added caches to eliminate repeatable run-time bindings of functions, classes, constants, methods and properties 2010-05-24 14:11:39 +00:00
Dmitry Stogov
24704df3a8 Fixed a possible memory corruption in ArrayObject::uasort() Reported by Stefan Esser 2010-05-13 08:09:54 +00:00
Dmitry Stogov
f5ef32e7ab Fixed a possible memory corruption in ArrayObject::uasort() Reported by Stefan Esser 2010-05-13 08:09:54 +00:00
Dmitry Stogov
94dd83722b Changed the structure of op_array.opcodes. The constant values are moved from opcode operands into a separate literal table 2010-04-20 10:57:45 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Dmitry Stogov
42b62e7ca6 Fixed ext/spl/tests/arrayObject_magicMethods2.phpt 2009-09-22 07:54:06 +00:00
Etienne Kneuss
6e164aa35a Fix several recursion problems when var_dump'ing self-referencing objects 2009-08-13 22:07:05 +00:00
Felipe Pena
fc4e43ec3c MFH:
- Added missing methods' arginfo (for void params)
- Fixed arginfos:
  - MultipleIterator::__construct
  - MultipleIterator::setFlags      (Thanks Philip!)
  - SplFixedArray::__construct
2009-07-04 20:31:27 +00:00
Arnaud Le Blanc
52cc098a90 MFH: Better fix for #45622 (patch by robinf at php do net) 2009-05-21 13:26:14 +00:00
Etienne Kneuss
8623e9db8b MFH: Fix #47231 (offsetGet error using incorrect offset) 2009-03-19 03:01:37 +00:00
Antony Dovgal
029f5e651a fix compile warning 2009-01-27 14:50:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Etienne Kneuss
b296c25ba2 MFH: Fix #45820 (Empty ArrayObject keys not allowed) 2008-12-30 23:34:29 +00:00
Arnaud Le Blanc
756aef0607 CS 2008-11-19 17:53:47 +00:00
Arnaud Le Blanc
a46300ec06 Improved ArrayObject performance (made spl_hash_verify_pos() an O(1)
and removed some spl_array_get_hash_table() calls). Fixes #46039
2008-11-19 14:41:40 +00:00
Etienne Kneuss
3919b16f04 MFH: Fix #46241 (stacked error_handlers, error_handling in general) 2008-11-19 02:00:53 +00:00
Felipe Pena
fc2fb50d09 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-11-17 11:28:01 +00:00
Felipe Pena
7a37fa2d6b - Revert ZEND_BEGIN_ARG_INFO change 2008-11-02 21:19:39 +00:00
Felipe Pena
df10005563 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-10-24 14:35:40 +00:00
Etienne Kneuss
1a642296ba Fix #46317 (Iterator class not properly checked) 2008-10-19 18:00:24 +00:00
Antony Dovgal
8696c38966 MFH: fix memleak 2008-10-17 22:09:44 +00:00
Etienne Kneuss
0d7d9b0540 Fix #46222 (Allow indirect modifications of Arrays inside ArrayObject + fix EG(uninitialized_zval_ptr) overwrite) 2008-10-05 14:20:55 +00:00
Etienne Kneuss
f0cf9b4c88 MFH: Fix #46192 (Serialization of ArrayObject with objects as storage) 2008-09-29 22:45:28 +00:00
Dmitry Stogov
b6a4094c03 Fixed bug #46115 (Memory leak when calling a method using Reflection) 2008-09-19 12:48:33 +00:00
Rob Richards
0bbb07cff6 no zstr in 5_3 2008-08-25 19:38:04 +00:00
Jani Taskinen
1081c6ce1e MFH 2008-08-25 19:07:20 +00:00
Etienne Kneuss
efd817bf13 MFH: Fix #45826 (Custom serialization) 2008-08-25 18:40:44 +00:00
Etienne Kneuss
c77ca4c34a MFH: Fix error_handling usage in various extensions 2008-08-08 22:07:07 +00:00
Robin Fernandes
cf167a669b Improve ArrayObject::exchangeArray() behaviour with objects and CoW references (see http://turl.ca/exarr ). 2008-08-04 11:45:21 +00:00
Arnaud Le Blanc
77baec3f6d MFH: Fix bug #45622 (isset($arrayObject->p) misbehaves with ArrayObject::ARRAY_AS_PROPS set) 2008-07-26 12:34:10 +00:00
Arnaud Le Blanc
f9ef6c8723 MFH: Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st private prop of wrapped object) 2008-07-24 15:54:41 +00:00
Etienne Kneuss
3d0d02f95b MFH: Fix build for solaris 2008-07-20 16:32:55 +00:00
Etienne Kneuss
f4c3f18053 MFH: Fix valgrind errors in array_method, and possibly #45349 (Thanks tony for the patch) 2008-07-19 13:13:57 +00:00
Etienne Kneuss
0eea0a059e MFH: First part of count/handlers related fixes 2008-07-06 23:45:56 +00:00
Etienne Kneuss
06cef68307 Add consistency with the flag 2008-05-06 23:08:06 +00:00
Marcus Boerger
fdf95a00dc - CS/WS 2008-02-04 16:48:06 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Ilia Alshanetsky
31fb02db2e Kill unused vars 2007-12-17 19:00:07 +00:00
Marcus Boerger
aabb1c3097 - Fix folding 2007-12-17 13:46:27 +00:00
Hannes Magnusson
bfad3071cd Fix typo 2007-12-16 18:31:07 +00:00
David Coallier
7c1087f0aa - Nitpicking, using same code (without unicode handling) than in HEAD
just removed useless } else {
2007-12-12 03:29:31 +00:00
Rob Richards
d4cbb77c90 fix win build 2007-12-07 13:33:10 +00:00
Marcus Boerger
cd77dc1242 - Fix for #41528 (Classes extending ArrayObject do not serialize correctly) 2007-12-06 16:04:17 +00:00
Marcus Boerger
d71b3de7f4 - Fixing #38618 by:
- [DOC] ArrayIterator::CHILD_ARRAYS_ONLY, ArrayObject::CHILD_ARRAYS_ONLY
  Passing this flag in the ctor prevents ArrayIterator from following
  objects in ArrayObject::getIterator(), ArrayIterator::hasChildren(),
  ArrayIterator::getChildren().
  The exact behavior might change:
    - should the flag be set by default
    - should the flag be changed to have a negative effect
2007-12-05 15:56:41 +00:00
Jani Taskinen
b489251177 - MFH from HEAD:
. Folding tags
  . Parameter parsing
  . SPL debug info
  . array function improvements (not all yet)
  . Improvements to function calling with call_user_* functions
  . Improvements to debugging info in var_dump/print_r
# I propably forgot already something but this all was pretty close tied
# to each other so it wasn't possible to do it in parts.
2007-11-02 19:40:39 +00:00
Marcus Boerger
56f9d57091 - Fix #42654 (maybe also a bunch of others) 2007-10-18 03:55:43 +00:00
Yiduo (David) Wang
4b4d634cb9 MFH: Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:22:07 +00:00
Dmitry Stogov
6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Antony Dovgal
bfed3520c9 MFH: fix #41691 (ArrayObject::exchangeArray hangs Apache) 2007-07-20 10:53:56 +00:00
Antony Dovgal
f132df4f66 MFH: fix #41692 (ArrayObject shows weird behaviour in respect to inheritance) 2007-06-27 12:30:28 +00:00
Marcus Boerger
515f4f6e6f - Fix 40442 2007-04-06 17:57:10 +00:00
Marcus Boerger
eceb7faee0 - MFH Drop double variable declaration 2007-03-24 16:28:53 +00:00
Marcus Boerger
4c1c431a38 - MFH Fix Bug #40872 (inconsistency in offsetSet, offsetExists treatment
of string enclosed integers)
2007-03-20 20:28:08 +00:00
Marcus Boerger
ac3b5ebbde - MFH Rearrange code: mode Countable from spl_array.c to spl_iterator.c 2007-02-08 22:17:40 +00:00
Ilia Alshanetsky
5068511748 Fixed bug #40036 (empty() does not work correctly with ArrayObject when
using ARRAY_AS_PROPS).
2007-01-07 03:52:44 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Hannes Magnusson
5006fb2ceb MFH: Fix double "wrong param count" messages 2006-11-03 15:13:17 +00:00
Sara Golemon
3042386549 MFH(r-1.114) Can't use real arrays held by ArrayObjects in write context 2006-10-20 02:11:19 +00:00
Nuno Lopes
c45c9748dc fix #38402: wrong proto for Array*::offsetGet() 2006-08-11 17:05:23 +00:00
Marcus Boerger
ac3c882bb6 - Use of E_RECOVERABLE_ERROR 2006-05-11 08:06:22 +00:00
Marcus Boerger
9afb3e041b - Update after api changes
- MFH
  . ArrayIterator/ArrayObject: function lookup caches and array functions
  . Added RegExIterator, RecursiveRegExIterator
  . Added (full) caching support for CachingIterator
2006-05-10 00:03:38 +00:00
Antony Dovgal
e8270edf9d fix memory corruptions and leaks when cloning ArrayObjects and ArrayIterators 2006-04-07 22:53:23 +00:00
Marcus Boerger
c58e1fa5be - MFH
. Fixed bug #36941 (ArrayIterator does not clone itself)
  . Fixed SEGV when ArrayObject/Iterator use reference to self
  . Added tests
2006-04-04 19:53:21 +00:00
Antony Dovgal
9a59df13cc fix segfault when assigning value by ref and add test
(I consider it's wrong that we can't do it, but we shouldn't segfault anyway)
2006-04-01 19:13:04 +00:00
Antony Dovgal
59b8592c8c fix bug #36898 (__set() leaks in classes extending internal ones)
Added:
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)

to initialize and destroy zend_object structs
2006-03-29 14:28:43 +00:00
Dmitry Stogov
87ae2460d1 Fixed possible memory corruption 2006-03-23 11:42:32 +00:00
Antony Dovgal
1ce8546cd1 fix leak 2006-03-22 23:12:03 +00:00
Antony Dovgal
32f611097f fix #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault)
fix similar issue in offsetExists()
remove redundant semicolons
2006-03-22 21:56:40 +00:00
Marcus Boerger
7dc322754a - Fix issues with not/double calling of constructors of SPL iterators
- Fix issues with info-class/file-class in SPL directory handling classes
- Add SimpleXMLElement::count()
- Drop erroneous RecursiveDirectoryIterator::getSubPathInfo()
- Drop dead code
- Add tests
- Update docu
2006-03-05 17:39:49 +00:00
Marcus Boerger
4b2b9461d4 - MFH No more old parameter api usage 2006-02-12 16:44:36 +00:00
Marcus Boerger
a31f337c24 - MFH Fix ArrayIterator::seek() edge cases 2006-02-02 22:17:42 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Antony Dovgal
241aa9a59d MFH: fix #35197 (Destructor is not called) and similar issues in other extensions 2005-11-14 22:03:02 +00:00
Marcus Boerger
de03dd6387 - MFH Fix potential SEGV with overloaded objects 2005-10-09 14:42:08 +00:00
Marcus Boerger
061ff97f69 - MFH Throw an exception if an illegal string value is being used in
ArrayObject::offsetSet()
2005-10-03 17:59:56 +00:00
Marcus Boerger
184309c2e9 - MFH Fix issue with RecursiveArrayIterator::getChildren() 2005-10-03 09:14:30 +00:00
Marcus Boerger
7d918fae4c - Synch naming/move changes with HEAD
- Update tests/docu
# New functionality in CachingIterator/RecursiveIteratorIterator not MFHed
2005-09-18 17:15:04 +00:00
Marcus Boerger
b4dd030782 MFH:
- Add SplObjectStorage
- Add RecursiveFilterIterator
- Rename Observer to SplObserver
- Rename Subject to SplSubject
- Move SPL constants to class constants
- Update docu
2005-09-15 03:33:04 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Marcus Boerger
74a63cc1b2 - Fixed #33136:
- Allow ArrayObject::offsetSet(NULL, $value) as replacement for [] = $value
- Fix memleaks with overloading ArrayObject
2005-06-20 03:02:52 +00:00
Marcus Boerger
6a67d06c26 - Fix handling of ArrayObject/ArrayIterator flags and provide test 2005-06-20 00:19:18 +00:00
Marcus Boerger
309025e8c1 - Small fix (found by joerg) 2005-05-24 17:59:42 +00:00
Marcus Boerger
b45fb630d9 - Add ability to reference the object itself
- Add ability to exchange the refrenced object
- Add ArrayObject::getFlags/setFlags and 2nd param to __construct to
  control operation modes
2005-05-19 15:52:02 +00:00
Marcus Boerger
041524feee - Fix Bug #32394 offsetUnset() segfaults in a foreach 2005-03-21 20:07:33 +00:00
Marcus Boerger
dd54f36d49 - Fix signature definition 2005-03-13 16:35:01 +00:00
Marcus Boerger
b924ef8796 - Don't touch refcount/is_ref 2005-03-11 00:44:34 +00:00
Johannes Schlüter
0e9e0f62fc - Fix #32238 (spl_array.c: void function cannot return value) 2005-03-08 21:33:15 +00:00
Marcus Boerger
89f320755d - Use new objects 2005-03-06 23:09:21 +00:00
Marcus Boerger
e4ce3e36ef - Negative seeking is not supported 2005-03-05 11:35:13 +00:00
Marcus Boerger
7cca51e97e - Fix bug #32134 2005-03-03 10:35:34 +00:00
Marcus Boerger
9001280387 - Fix #32130 (ArrayIterator::seek() does not throw an Exception on invalid index) 2005-03-01 10:06:11 +00:00
Marcus Boerger
f18aa85252 - Know whether ew refer to an external array (is_ref) or not 2005-01-27 00:22:06 +00:00
Marcus Boerger
08cc69dbf4 - Correct exception throwing 2004-11-11 20:06:23 +00:00
Marcus Boerger
4c8bca469f - Use exceptions now they work 2004-11-11 19:42:11 +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
8e3a8b1e8e - Add interface Countable (PECL #30113) 2004-11-01 10:45:54 +00:00
Marcus Boerger
b9470609ad - Minor fixes
- Implement AppendIterator in C
2004-11-01 00:26:59 +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
Marcus Boerger
819127b74b Fix seeking 2004-08-31 20:54:00 +00:00
Marcus Boerger
dc66fb1f10 Fixed bug #28822: ArrayObject::offsetExists() works inverted 2004-06-21 19:15:27 +00:00
Marcus Boerger
de8b457181 Fix 2nd issue of bug #28831 2004-06-20 16:46:27 +00:00
Marcus Boerger
bfc3e689de - Fix bug #28309 2004-05-07 06:13:21 +00:00
Marcus Boerger
635052875e Count support for ArrayIterator & ArrayObject 2004-05-06 08:57:20 +00:00
Marcus Boerger
a9bdb2ed88 - Fix protos and add notes to the docs
- Reorder func prototypes to show what is common and what is specific
2004-04-29 22:52:49 +00:00
Marcus Boerger
74f21310e3 - ArrayObject::append() must not be called when it refers to an object 2004-04-29 22:25:45 +00:00
Marcus Boerger
bf5f758c93 - Remove unused variable
- Respect visibility in count() and add a test for that
2004-04-29 07:22:02 +00:00
Marcus Boerger
69e792ee7b Count() was missing 2004-04-28 21:45:41 +00:00
Marcus Boerger
7a5380297b - Fix ArrayIterator iteration
- Make it seekable
2004-04-27 15:42:45 +00:00
Marcus Boerger
9238d1bbbc With the new inheritance rules we need an explicit append method. 2004-04-25 13:04:36 +00:00