summaryrefslogtreecommitdiff
path: root/ext/spl
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-5.6'Anatol Belski2015-06-081-1/+1
|\ | | | | | | | | * PHP-5.6: fixed test related to fix for bug #67805
| * Merge branch 'PHP-5.5' into PHP-5.6Anatol Belski2015-06-081-1/+1
| |\ | | | | | | | | | | | | * PHP-5.5: fixed test related to fix for bug #67805
| | * fixed test related to fix for bug #67805Anatol Belski2015-06-081-1/+1
| | |
| * | Merge branch 'PHP-5.5' into PHP-5.6Anatol Belski2015-06-082-1/+16
| |\ \ | | |/ | | | | | | | | | | | | * PHP-5.5: updated NEWS Fix bug #67805 - SplFileObject setMaxLineLength.
| | * Fix bug #67805 - SplFileObject setMaxLineLength.Willian Gustavo Veiga2015-06-082-1/+16
| | |
* | | Fix bug #67805 - SplFileObject setMaxLineLength.Willian Gustavo Veiga2015-06-082-1/+16
| | |
* | | fix dir separator in testAnatol Belski2015-06-081-3/+3
| | |
* | | fix testStanislav Malyshev2015-06-011-1/+6
| | |
* | | Merge branch 'PHP-5.6'Stanislav Malyshev2015-06-012-1/+18
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * PHP-5.6: Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error Conflicts: ext/spl/spl_heap.c
| * | Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2015-06-012-1/+18
| |\ \ | | |/ | | | | | | | | | * PHP-5.5: Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error
| | * Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal errorStanislav Malyshev2015-06-012-1/+18
| | |
* | | Add GC support for ArrayObjectNikita Popov2015-05-201-0/+10
| | | | | | | | | | | | | | | gc_024 test changes because the array that ArrayObject holds is now counted separately from the ArrayObject.
* | | Display TypeExceptions like normal exceptionsNikita Popov2015-05-172-2/+10
| | | | | | | | | | | | | | | | | | | | | We currently don't show the argument at which the error actually occured in the trace - should probably either add it or don't display args on incomplete frames altogether, otherwise this'll probably be confusing.
* | | Tweak uncaught exception message displayNikita Popov2015-05-1722-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements a reduced variant of #1226 with just the following change: -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d +Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d The '' wrapper around messages is very weird if the exception message itself contains ''. Futhermore having the message wrapped in '' doesn't work for the "and defined" suffix of TypeExceptions.
* | | Display EngineExceptions like ordinary exceptionsNikita Popov2015-05-155-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | TypeException stays as-is for now because it uses messages that are incompatible with the way exception messages are displayed. closure_038.phpt and a few others now show that we're generating too many exceptions for compound operations on undefined properties -- this needs to be fixed in a followup.
* | | Improve fast_is_[not_]identical() functions to teturn value instead of ↵Dmitry Stogov2015-04-291-3/+1
| | | | | | | | | | | | | | | | | | takeing additional arguments. Pair INSTANCEOF with the following JMPZ/JMPNZ.
* | | Respect USE_OTHER in spl_array_is_objectNikita Popov2015-04-252-11/+35
| | | | | | | | | | | | Also a bit of code cleanup in get_hash_table.
* | | Don't store $this reference for IS_SELF AONikita Popov2015-04-252-52/+50
| | | | | | | | | | | | | | | | | | The var_dump output changes in array_022.phpt were wrong previously, the "storage" that was referenced there was not the actually used storage.
* | | Drop ArrayObject IS_REF flagNikita Popov2015-04-251-6/+4
| | |
* | | Implement GC for spl dllNikita Popov2015-04-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | As far as I can discern this should be safe, because the rc on the linked list elements is only > 1 if an iterator points to it and the iterator will also hold a reference to the list object. The implementation for mangagement of the GC array is the same as with the spl object storage.
* | | Drop unused is_self memberNikita Popov2015-04-161-2/+1
| | |
* | | Add GC support to SPL heap and PQNikita Popov2015-04-151-17/+15
| | | | | | | | | | | | | | | | | | ctor/dtor are now no longer called for insert/delete_top operations, only for cloning and freeing of the object. Otherwise elements will have a minimum rc of 2 and GC won't be able to free them.
* | | Use object apply count in var_dump / print_rNikita Popov2015-04-154-126/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using the array apply count on the debug_info array, use the object apply count for recursion detection when dumping. This handles recursion in a more generic way and does not require each debug_info handler to deal with this. This allows returning a temporary debug_info array, instead of having to store it in the object (thus delaying destruction of the values). Switch SPL debug_info handlers to use a temporary array.
* | | Return null on zpp failure in Array::exchangeArray()Nikita Popov2015-04-152-4/+2
| | | | | | | | | | | | Method was still returning a value despite zpp failing previously...
* | | Remove unnecessary retval members in SPLNikita Popov2015-04-153-36/+26
| | | | | | | | | | | | | | | This is what the rv params are for. Avoid holding onto values longer than necessary.
* | | Fix leak in RecursiveRegexIterator::getChildren()Nikita Popov2015-04-151-0/+1
| | |
* | | Fix leaks in recursive iterator constructionNikita Popov2015-04-151-19/+13
| | |
* | | Changed ArrayIterator implementation using zend_hash_iterator_... API. ↵Dmitry Stogov2015-04-096-139/+59
| | | | | | | | | | | | Allowed modification of itterated ArrayObject using the same behavior as proposed in `Fix "foreach" behavior`. Removed "Array was modified outside object and internal position is no longer valid" hack.
* | | Fixed bug #68887 (resources are not freed correctly)Dmitry Stogov2015-04-081-2/+2
| | |
* | | Use new macrosXinchen Hui2015-04-081-2/+2
| | |
* | | Always throw TypeException on throwing zpp failuresNikita Popov2015-04-0627-242/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to report FAILURE errors using a TypeException instead of a Warning, like it would happen in strict mode. Adds a zend_parse_parameters_throw() convenience function, which invokes zpp with this flag. Converts all cases I could identify, where we currently have throwing zpp usage in constructors and replaces them with this API. Error handling is still replaced to EH_THROW in some cases to handle other, domain-specific errors in constructors.
* | | Don't relay on reference-counter when parameter expected to be a reference, ↵Dmitry Stogov2015-04-031-18/+18
| | | | | | | | | | | | but value given.
* | | Convert fatal errors into EngineExceptionsDmitry Stogov2015-04-021-2/+6
| | | | | | | | | | | | Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
* | | Reclassify E_STRICT noticesNikita Popov2015-04-012-2/+2
| | | | | | | | | | | | | | | | | | | | | Per RFC https://wiki.php.net/rfc/reclassify_e_strict While reviewing this, found that there are still three E_STRICTs left in libraries - need to discuss those.
* | | Merge branch 'InternalClassClean'Dmitry Stogov2015-04-017-51/+49
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * InternalClassClean: Fixed test Patch improvement: Fixed indentation. Fixed comment style. Fixed commented out code. Reverted change to function name and added note of why it is different from the class it is actually changing. Made UConverter throw an exception if the constructor fails. Fixed PDO constructor to not return null. Fixed fileinfo behaviour. Made Phar throw exception on bad constructor. Converted intl extension to use IntlException in constructors. Fixed SplFixedArray and tests. Fixed ReflectionExtension and ReflectionProperty. Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter. Fixed PDORow behaviour and message.
| * \ \ Merge branch 'InternalClassClean' of github.com:Danack/php-src into ↵Dmitry Stogov2015-03-307-51/+49
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InternalClassClean * 'InternalClassClean' of github.com:Danack/php-src: Fixed indentation. Fixed comment style. Fixed commented out code. Reverted change to function name and added note of why it is different from the class it is actually changing. Made UConverter throw an exception if the constructor fails. Fixed PDO constructor to not return null. Fixed fileinfo behaviour. Made Phar throw exception on bad constructor. Converted intl extension to use IntlException in constructors. Fixed SplFixedArray and tests. Fixed ReflectionExtension and ReflectionProperty. Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter. Fixed PDORow behaviour and message.
| | * | | Fixed indentation. Fixed comment style. Fixed commented out code.Danack2015-03-161-4/+4
| | | | |
| | * | | Fixed SplFixedArray and tests.Danack2015-03-017-50/+48
| | | | |
* | | | | Add XFAIL testXinchen Hui2015-03-311-0/+22
|/ / / /
* | | | cleanup mod version macros and mod defs, round xAnatol Belski2015-03-232-1/+3
| | | |
* | | | Optimize zend_string_realloc() add more specialized versions ↵Dmitry Stogov2015-03-201-2/+2
| | | | | | | | | | | | | | | | zend_string_extend() and zend_string_truncate()
* | | | Merge branch 'PHP-5.6'Xinchen Hui2015-03-141-1/+1
|\ \ \ \ | | |/ / | |/| |
| * | | Merge branch 'PHP-5.5' into PHP-5.6Xinchen Hui2015-03-141-1/+1
| |\ \ \ | | | |/ | | |/|
| | * | Fixed typoXinchen Hui2015-03-141-1/+1
| | | |
* | | | Remove TSRMLSXinchen Hui2015-03-141-1/+1
| | | |
* | | | Merge branch 'PHP-5.6'Xinchen Hui2015-03-144-28/+48
|\ \ \ \ | |/ / / | | | | | | | | | | | | Conflicts: ext/spl/spl_observer.c
| * | | Merge branch 'PHP-5.5' into PHP-5.6Xinchen Hui2015-03-144-30/+47
| |\ \ \ | | |/ /
| | * | Little improvement, update NEWs, added testXinchen Hui2015-03-142-9/+19
| | | |
| | * | Fix a leakVektah2015-03-131-6/+2
| | | |
| | * | Fix bug #69227 and #65967Vektah2015-03-133-29/+40
| | | | | | | | | | | | | | | | | | | | This patch fixes a use (in zend_gc.c) after free (in spl_observer.c). See https://bugs.php.net/bug.php?id=69227