Commit Graph

1822 Commits

Author SHA1 Message Date
Bob Weinand
e58a1abb00 Fix memory leak (double copy) in SplPriorityQueue 2015-06-19 03:42:59 +02:00
Anatol Belski
269acaa363 Merge branch 'pull-request/1284'
* pull-request/1284:
  Rename interface macros
  Fix typo in UPGRADING
  Move definition of Throwable to zend_exceptions.h/c
  Check for zend_ce_throwable instead
  Fix some missed tests
  Add Throwable tests
  Fix previous exception type check
  Updated UPGRADING with RFC link
  Changed AssertionException to AssertionError
  Update exception error messages
  Throwable method signatures.
  Update exception names in tests after formatting changes.
  Merge exception formatting changes.
  Make zend_get_exception_base static.
  Fix a few missed tests.
  Fix handler double copy.
  Updated tests to reflect exception class changes.
  Remodel exceptions based on Throwable interface
2015-06-17 21:55:03 +02:00
Nikita Popov
fb346c8f93 Support references in convert_to_*
conver_to_* functions now accept REFERENCE values, which will be
unwrapped before performing the usual conversion. This is consistent
with convert_scalar_to_number and matches the expected behavior in
a couple random use-sites I checked.

Also includes a couple fixes/cleanups elsewhere and two tests for
cases that previously didn't work (though the reference issue existed
all over the place).
2015-06-16 19:55:33 +02:00
Dmitry Stogov
6ae375db31 Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken) 2015-06-16 10:53:53 +03:00
Aaron Piotrowski
110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Dmitry Stogov
8e10e8f921 Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Nikita Popov
5d3cf577aa Make convert_to_* safe with rc>1
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.

All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).

What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.

Also fixes bug #69788.
2015-06-11 23:23:57 +02:00
Anatol Belski
c8cf54719f Merge branch 'PHP-5.6'
* PHP-5.6:
  fixed test related to fix for bug #67805
2015-06-08 13:28:53 +02:00
Anatol Belski
18b3508c3c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fixed test related to fix for bug #67805
2015-06-08 13:28:23 +02:00
Anatol Belski
17f2d1e8a7 fixed test related to fix for bug #67805 2015-06-08 13:27:22 +02:00
Anatol Belski
3c02e6f457 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fix bug #67805 - SplFileObject setMaxLineLength.
2015-06-08 12:11:58 +02:00
Willian Gustavo Veiga
b470d9a0d6 Fix bug #67805 - SplFileObject setMaxLineLength. 2015-06-08 12:08:05 +02:00
Willian Gustavo Veiga
8e747f6833 Fix bug #67805 - SplFileObject setMaxLineLength. 2015-06-08 11:36:27 +02:00
Anatol Belski
0cd86f6b77 fix dir separator in test 2015-06-08 11:29:04 +02:00
Stanislav Malyshev
c0a54d62e2 fix test 2015-06-01 23:58:19 -07:00
Stanislav Malyshev
75d16a4564 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error

Conflicts:
	ext/spl/spl_heap.c
2015-06-01 22:55:16 -07:00
Stanislav Malyshev
e96c64ed5e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error
2015-06-01 22:53:56 -07:00
Stanislav Malyshev
1cbd25ca15 Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error 2015-06-01 22:07:16 -07:00
Nikita Popov
4e03ba4a6e Add GC support for ArrayObject
gc_024 test changes because the array that ArrayObject holds is
now counted separately from the ArrayObject.
2015-05-20 18:28:09 +02:00
Aaron Piotrowski
e97d5fab35 Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
Aaron Piotrowski
fb7206e452 Merge branch 'master' into throwable-interface 2015-05-17 16:15:35 -05:00
Nikita Popov
440481fb3e Display TypeExceptions like normal exceptions
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.
2015-05-17 19:54:12 +02:00
Nikita Popov
3ae995f03c Tweak uncaught exception message display
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.
2015-05-17 18:47:06 +02:00
Aaron Piotrowski
64b167d201 Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
Nikita Popov
c9f27ee422 Display EngineExceptions like ordinary exceptions
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.
2015-05-15 23:40:32 +02:00
Dmitry Stogov
d880ead8a7 Improve fast_is_[not_]identical() functions to teturn value instead of takeing additional arguments.
Pair INSTANCEOF with the following JMPZ/JMPNZ.
2015-04-29 16:43:23 +03:00
Nikita Popov
e0a39eecf1 Respect USE_OTHER in spl_array_is_object
Also a bit of code cleanup in get_hash_table.
2015-04-25 16:13:39 +02:00
Nikita Popov
66ce7cc083 Don't store $this reference for IS_SELF AO
The var_dump output changes in array_022.phpt were wrong previously,
the "storage" that was referenced there was not the actually used
storage.
2015-04-25 16:13:37 +02:00
Nikita Popov
3140d0c0c8 Drop ArrayObject IS_REF flag 2015-04-25 16:13:32 +02:00
Nikita Popov
c77d97f356 Implement GC for spl dll
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.
2015-04-16 15:46:28 +02:00
Nikita Popov
6c98024f87 Drop unused is_self member 2015-04-16 15:33:47 +02:00
Nikita Popov
86152b18a3 Add GC support to SPL heap and PQ
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.
2015-04-15 22:00:12 +02:00
Nikita Popov
dc764bf644 Use object apply count in var_dump / print_r
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.
2015-04-15 22:00:12 +02:00
Nikita Popov
eed18f0ee8 Return null on zpp failure in Array::exchangeArray()
Method was still returning a value despite zpp failing previously...
2015-04-15 20:43:41 +02:00
Nikita Popov
e10be0d0fd Remove unnecessary retval members in SPL
This is what the rv params are for. Avoid holding onto values
longer than necessary.
2015-04-15 20:39:08 +02:00
Nikita Popov
b4b872f4c9 Fix leak in RecursiveRegexIterator::getChildren() 2015-04-15 20:03:15 +02:00
Nikita Popov
7605e02e3b Fix leaks in recursive iterator construction 2015-04-15 19:51:02 +02:00
Dmitry Stogov
2b6a568df1 Changed ArrayIterator implementation using zend_hash_iterator_... API. 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. 2015-04-09 15:40:17 +03:00
Dmitry Stogov
4d9a1883aa Fixed bug #68887 (resources are not freed correctly) 2015-04-08 13:29:42 +03:00
Xinchen Hui
f23f7dfed0 Use new macros 2015-04-08 14:30:47 +08:00
Nikita Popov
122d759618 Always throw TypeException on throwing zpp failures
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.
2015-04-06 11:27:34 +02:00
Dmitry Stogov
dcaa79546b Don't relay on reference-counter when parameter expected to be a reference, but value given. 2015-04-03 16:35:06 +03:00
Dmitry Stogov
ea09a9fa32 Convert fatal errors into EngineExceptions
Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
2015-04-02 02:05:25 +03:00
Nikita Popov
8d00385871 Reclassify E_STRICT notices
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.
2015-04-01 11:17:55 +02:00
Dmitry Stogov
4796e0242b Merge branch 'InternalClassClean'
* 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.
2015-04-01 12:11:13 +03:00
Xinchen Hui
fd1a7c5f2d Add XFAIL test 2015-03-31 11:53:52 +08:00
Dmitry Stogov
9155a267ad Merge branch 'InternalClassClean' of github.com:Danack/php-src into 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.
2015-03-30 12:14:43 +03:00
Anatol Belski
663074b6b1 cleanup mod version macros and mod defs, round x 2015-03-23 21:30:22 +01:00
Dmitry Stogov
d146d15003 Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate() 2015-03-20 02:02:42 +03:00
Danack
910a324306 Fixed indentation. Fixed comment style. Fixed commented out code. 2015-03-16 23:14:56 +00:00
Xinchen Hui
9420a2a5b0 Merge branch 'PHP-5.6' 2015-03-14 11:32:09 +08:00
Xinchen Hui
96bb3b838c Merge branch 'PHP-5.5' into PHP-5.6 2015-03-14 11:31:53 +08:00
Xinchen Hui
5b87d52041 Fixed typo 2015-03-14 11:31:12 +08:00
Xinchen Hui
326ac546ab Remove TSRMLS 2015-03-14 01:04:00 +08:00
Xinchen Hui
e827d1a424 Merge branch 'PHP-5.6'
Conflicts:
	ext/spl/spl_observer.c
2015-03-14 01:01:02 +08:00
Xinchen Hui
396bc00caa Merge branch 'PHP-5.5' into PHP-5.6 2015-03-14 00:53:32 +08:00
Xinchen Hui
ed59370f0a Little improvement, update NEWs, added test 2015-03-14 00:52:53 +08:00
Dmitry Stogov
2b42d71908 Changed HashTable layout:
Removed HashTable->arHash (reduced memory consumption). Now hash slots may be accessed using HT_HASH() macro.
Hash slotas are allocated together with Buckets (before them) and lay in reverse order from HashTable->arData base address (see comments in Zend/zend_types.h)
Indexes in hash table and conflict resolution chains (Z_NEXT) may be stored as indeces or offsets in bytes, depending on system (32 or 64-bit).
HashTable data filelds are reordered to keep the most useful for zend_hash_find() data in the same CPU cache line.
2015-03-13 17:13:19 +03:00
Vektah
482500b455 Fix a leak 2015-03-13 15:54:30 +11:00
Vektah
950d3d6e9b Fix bug #69227 and #65967
This patch fixes a use (in zend_gc.c) after free (in spl_observer.c).
See https://bugs.php.net/bug.php?id=69227
2015-03-13 15:02:05 +11:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
Dmitry Stogov
48deb1cd94 Free memory if destructor wasn't called 2015-03-11 00:57:28 +03:00
Dmitry Stogov
a30d328671 Errors converted to exceptions are not "recoverable" anymore. 2015-03-10 10:31:55 +03:00
Dmitry Stogov
1c94ff0595 Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7

Pending changes regarding naming of BaseException and whether it
should be an interface.
2015-03-09 14:01:32 +01:00
Stanislav Malyshev
a8a77fff5c Merge branch 'PHP-5.6'
* PHP-5.6:
  Regression tests for SplFileInfo class setters
2015-03-08 17:13:32 -07:00
Stanislav Malyshev
dcc031470a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Regression tests for SplFileInfo class setters
2015-03-08 17:13:25 -07:00
Stanislav Malyshev
a2a20d29a8 Merge branch 'pull-request/1134' into PHP-5.5
* pull-request/1134:
  Regression tests for SplFileInfo class setters
2015-03-08 17:13:02 -07:00
Dmitry Stogov
2fa8d67a5c Use zend_string* instead of char* for opened_patch handling. Avoid reallocations and improve string reuse. 2015-03-04 02:05:28 +03:00
Jeremy Mikola
dea7bc8786 Regression tests for SplFileInfo class setters
Adds tests for SplFileInfo class setters accepting either the base and child classes, and throwing an exception for unexpected classes.

Related: http://svn.php.net/viewvc?view=revision&revision=336017 and https://github.com/facebook/hhvm/pull/4917
2015-03-02 14:45:26 -05:00
Danack
c57bde7c9e Fixed SplFixedArray and tests. 2015-03-01 13:44:55 +00:00
Reeze Xia
1b240ff9e3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69141 Missing arguments in reflection info for some builtin functions
2015-02-28 16:40:06 +08:00
Reeze Xia
f824f91ac9 Fixed bug #69141 Missing arguments in reflection info for some builtin functions
This include:

- setcookie (missing "httponly")
- setrawcookie (missing "httponly")
- spl_autoload_register (missing 2 optional params)
- mktime  (missing "is_dst")
- gmmktime (missing "is_dst")
2015-02-28 16:37:14 +08:00
Xinchen Hui
aadf7366e0 Merge branch 'PHP-5.6'
Conflicts:
	ext/spl/spl_observer.c
2015-02-25 18:23:54 +08:00
Xinchen Hui
9641bac0f5 Merge branch 'PHP-5.5' into PHP-5.6 2015-02-25 18:22:18 +08:00
Xinchen Hui
ffdc5728c8 Fixed bug #69108 ("Segmentation fault" when (de)serializing SplObjectStorage) 2015-02-25 18:21:59 +08:00
Julien Pauli
ee2f749a22 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed test fails for bug68557
2015-02-23 10:35:35 +01:00
Xinchen Hui
d5a1a3342b Fixed test fails for bug68557 2015-02-23 10:35:16 +01:00
Xinchen Hui
ea94be490a Fixed test fails for bug68557 2015-02-21 12:36:38 +08:00
Anatol Belski
cfae254b6b Merge branch 'PHP-5.6'
* PHP-5.6:
  split test for bug #68557 for windows
2015-02-20 16:02:32 +01:00
Anatol Belski
b21d0848c9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  split test for bug #68557 for windows
2015-02-20 16:02:07 +01:00
Anatol Belski
3082177bee split test for bug #68557 for windows 2015-02-20 16:01:34 +01:00
Julien Pauli
72af5cda27 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix #68557

Conflicts:
	ext/spl/spl_directory.c
2015-02-20 15:40:46 +01:00
Julien Pauli
13c3b78f1e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #68557
2015-02-20 15:38:48 +01:00
Julien Pauli
c111d1cd70 fix #68557 2015-02-20 15:09:35 +01:00
Xinchen Hui
b73fa1fa8f Fixed build on windows 2015-02-14 12:57:53 +08:00
Dmitry Stogov
e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Dmitry Stogov
4241a090ad Avoid reallocation in preg_replace() if nothing was replaced 2015-02-10 13:30:25 +03:00
Dmitry Stogov
9e70d7672d Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced. 2015-02-04 15:24:13 +03:00
Xinchen Hui
59593ba66c Fixed #68915 (wrong assertion here) 2015-01-27 15:58:32 +08:00
Dmitry Stogov
3e31838d19 zend_read_property() has to provide a holder for return value.
Previously it was possible that zend_read_property() returned pointer to zval allocated on stack.
2015-01-22 11:50:42 +03:00
Andrea Faulds
0be3626ec6 fix build 2015-01-18 19:20:12 +00:00
Xinchen Hui
4b3ae843fc Fixed #68832 (Unchecked return value) 2015-01-17 22:19:25 -05:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
8d26c53f7c Fix bug #68816 - pointer to local outside of scope 2015-01-14 16:14:43 -08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Nikita Popov
1266515e19 Fix uses of zval_add_ref and add comment on usage
zval_add_ref should be used as a copy ctor, after the value was
already copied.

In particular when used with hash insertions, it should be applied
to the return value of the insert function.
2015-01-05 17:02:11 +01:00
Stanislav Malyshev
ee7decb7ff Revert "Add type info for spl_autoload_register"
This reverts commit ad728725cb.

Revert the change for now, probably needs better handling with account to BC
or joined with exceptions-in-engine RFC.
2014-12-29 09:50:00 -08:00
Levi Morrison
ad728725cb Add type info for spl_autoload_register 2014-12-28 10:16:25 -07:00
Levi Morrison
9a7ee202bb Fix bug #68641
Include more reflection information for spl_autoload_register
2014-12-27 19:05:16 -07:00
Nikita Popov
2d212b426a Drop duplicate arg from hash_get_current_key_ex 2014-12-26 21:06:18 +01:00
Xinchen Hui
b5b617674e Micro optimaztion (yeah, I know compiler supposed to do that) 2014-12-22 00:10:46 -05:00
Xinchen Hui
c24125e2f9 Micro optimization 2014-12-21 23:16:25 -05:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Anatol Belski
e112f6a04e second shot on removing TSRMLS_* 2014-12-14 14:07:59 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
ba35b22bc4 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (35 commits)
  Fixed bug #68398 msooxml matches too many archives
  Fix zpp call in apache_getenv()
  Drop unnecessary zval containers
  fixed test
  C89 compat
  add include for missing localeconv_r proto
  updated NEWS
  Fixed bug #65230 setting locale randomly broken
  Fix compilation error (ref #68424)
  Removed useless handlers
  Move checks for references into slow paths of operator functions. Remove duplicate opcode handlers.
  Revert unintentional docblock change
  Restored zip/oci8 PHP 4 code, add PHP 7 checks
  Note macro removal in UPGRADING.INTERNALS
  Removed ZEND_ENGINE_2 checks (and ZE1 code, it's been a decade!)
  Zend Engine 3
  Updated NEWS
  Updated NEWS
  Updated NEWS
  Start adding new attribute to control multi statements
  ...
2014-12-06 21:37:15 +01:00
Julien Pauli
3cd156d1d9 Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS
  Updated NEWS
  Fixed #68479 - Added escape parameter to SplFileObject::fputcsv

Conflicts:
	ext/spl/spl_directory.c
2014-12-05 10:18:22 +01:00
Julien Pauli
ee709c5366 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS
  Fixed #68479 - Added escape parameter to SplFileObject::fputcsv
2014-12-05 10:12:08 +01:00
Peter Cowburn
557026301f Fixed #68479 - Added escape parameter to SplFileObject::fputcsv 2014-12-05 10:10:10 +01:00
Anatol Belski
88bb9fedc4 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (111 commits)
  Fix zend_fcall_info_arg*() to use ZVAL_COPY
  Fixed #65213 - cannot cast SplFileInfo to boolean
  add initial install
  switch to C travis project instead of PHP
  use the generic TRAVIS environment var to check for travis (see http://docs.travis-ci.com/user/ci-environment/)
  fix TS build
  add config option to target codegen architectures
  updated NEWS
  updated NEWS
  Fixed bug #55541 errors spawn MessageBox, which blocks test automation
  Get rid of duplicate handlers (ZEND_ADD_SPEC_TMP_TMP and ZEND_ADD_SPEC_VAR_VAR are absolutely the same).
  Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*.
  Fixed __debugInfo() support
  Update UPGRADING for the new variadic functions, and re-sort.
  Improved POST INC/DEC
  make sure that we don't truncate the stack trace and cause false test failures when the test is executed in a directory with long path
  Missed closed folder mark
  Revert "Unecessary assignment"
  Fixed improper memory release
  Unecessary assignment
  ...
2014-12-05 03:50:02 +01:00
Tjerk Meesters
7e933c5ff8 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed #65213 - cannot cast SplFileInfo to boolean

Conflicts:
	ext/spl/spl_directory.c
2014-12-04 07:22:54 +08:00
Tjerk Meesters
52b41f24e3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed #65213 - cannot cast SplFileInfo to boolean
2014-12-04 07:21:13 +08:00
Tjerk Meesters
2bcf8a6cd9 Fixed #65213 - cannot cast SplFileInfo to boolean 2014-12-04 07:17:33 +08:00
Anatol Belski
6ae09ddf49 Merge branch 'PHP-5.6'
* PHP-5.6:
  one more refix to the test
2014-12-01 19:10:44 +01:00
Anatol Belski
c45fcfd063 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  one more refix to the test
2014-12-01 19:10:18 +01:00
Anatol Belski
a0c03a3ec5 one more refix to the test 2014-12-01 19:09:39 +01:00
Remi Collet
65ad2aadea cleanup uneeded cast 2014-12-01 19:06:16 +01:00
Anatol Belski
1b8b384b11 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix dir separator in test
2014-12-01 18:56:14 +01:00
Anatol Belski
fe4a5abf30 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix dir separator in test
2014-12-01 18:55:52 +01:00
Anatol Belski
b6d624e54e fix dir separator in test 2014-12-01 18:55:20 +01:00
Remi Collet
4d16ca0beb Fix type of string lengths.
Those values are used in various call (including zpp) where
a size_t is expected.

This fix 82 failed test on ppc64
(bigendian is perfect to detect stack issue)
2014-12-01 16:10:44 +01:00
Julien Pauli
2faf448982 Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS
  Updated NEWS
  SPL: Fix for bug 66405 RecursiveDirectoryIterator with CURRENT_AS_PATHNAME

Conflicts:
	ext/spl/spl_directory.c
2014-11-29 12:14:37 +01:00
Julien Pauli
a93fb3524e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS
  SPL: Fix for bug 66405 RecursiveDirectoryIterator with CURRENT_AS_PATHNAME
2014-11-29 12:11:06 +01:00
Paul Garvin
605d32bedd SPL: Fix for bug 66405 RecursiveDirectoryIterator with CURRENT_AS_PATHNAME
Currently when you use RecursiveDirectoryIterator with the
CURRENT_AS_PATHNAME flag PHP will throw an UnexpectedValueException with
message 'Objects returned by RecursiveIterator::getChildren() must implement
RecursiveIterator'.This happend because getChildren() will return the
current directory name instead of an Iterator (or subclass of) as required
by the RecursiveIterator interface.

This commit changes getChildren() to return annother
RecursiveDirectoryIterator but current() still returns the path name when
CURRENT_AS_PATHNAME is used. A PHPT test case (bug66405.phpt) that
reproduces the bug is included.

This fix was originally against the PHP-5.4 branch, but it was not merged
before 5.4 reached EOL. I am hoping to get it applied to 5.5, 5.6, and
master.
2014-11-29 12:04:44 +01:00
Anatol Belski
3ca0ca1548 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (102 commits)
  fix dir separator in test
  fix TS build
  fix TS build
  Better fix for bug #68446
  Revert "Merge remote-tracking branch 'origin/PHP-5.6'"
  Revert NEWS and set test to XFAIL
  Revert "Fix bug #68446 (bug with constant defaults and type hints)"
  Improved zend_hash_clean() and added new optimized zend_symtable_clean()
  Use inline version of zval_ptr_dtor()
  Added new optimized zend_array_destroy() function
  Moved i_zval_ptr_dtor() from zend_execute.h to zend_variables.h
  fix REGISTER_NS_*_CONSTANT macros
  Removed useless assert. EG(uninitialized_zval) can't be refcounted.
  Use specialized destructors when types of zvals are known.
  move tests into proper place
  Improved assignment to object property
  Reuse zend_assign_to_variable() in zend_std_write_property()
  cleanup comments from svn/cvs era
  fix dir separator in test
  fork test for windows
  ...
2014-11-26 08:17:35 +01:00
Veres Lajos
06fdf359e3 typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-23 14:52:47 -08:00
Veres Lajos
4dc994571d typo fixes - https://github.com/vlajos/misspell_fixer
Conflicts:
	ext/ftp/ftp.h
	ext/pcre/pcrelib/pcre_printint.c
	ext/pcre/pcrelib/sljit/sljitLir.c
	ext/pcre/pcrelib/sljit/sljitLir.h
	ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
	ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
	ext/pgsql/pgsql.c
	ext/phar/func_interceptors.c
	ext/soap/soap.c
	ext/standard/image.c
2014-11-23 14:33:43 -08:00
Anatol Belski
c6bad96f30 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits)
  NEWS
  add test for bug #68381
  Fixed bug #68381 Set FPM log level earlier during init
  proper dllexport
  move to size_t where zend_string is used internally
  fix some datatype mismatches
  return after the warning, to fix uninitialized salt usage
  fix datatype mismatches
  add missing type specifier
  fix datatype mismatches
  fix unsigned check
  "extern" shouldn't be used for definitions
  joined identical conditional blocks
  simplify fpm tests
  SEND_VAR_NO_REF optimization
  Add test for bug #68442
  Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode
  Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client
  Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments.
  Add new FPM test for IPv4/IPv6
  ...

Conflicts:
	win32/build/config.w32
2014-11-18 21:18:52 +01:00
Anatol Belski
1100f1b8fd fix datatype mismatch 2014-10-29 15:30:13 +01:00
Anatol Belski
110cf649b7 fix datatype mismatches
especially spl_dual_it_object current.pos should have the same datatype as
limit.offset, also this doesn't increase the struct size.
2014-10-29 15:30:12 +01:00
Anatol Belski
da1d0ee1bd fix the comparison return value 2014-10-29 15:30:10 +01:00
Anatol Belski
3a6db1e77a fix datatype mismatch 2014-10-29 15:30:09 +01:00
Anatol Belski
e888f3e4de fix datatype mismatches 2014-10-29 15:30:08 +01:00
Anatol Belski
8041bbb76b fix datatype mismatch warning 2014-10-29 15:30:07 +01:00
Anatol Belski
c6116bea57 fix datatype mismatches 2014-10-29 15:30:06 +01:00
Anatol Belski
10d843b0fb fix datatype mismatch warnings 2014-10-29 15:30:04 +01:00
Anatol Belski
c51a42076c Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (214 commits)
  fix datatype mismatch warnings
  fix datatype mismatches
  fix datatype mismatches
  fix datatype mismatches
  fix datatype mismatch warnings
  fix datatype mismatch warnings
  fix datatype mismatch warnings
  fix datatype mismatch warning
  fix datatype mismatches
  fix datatype mismatch warnings
  Re-add phpdbg to travis
  Added some NEWS
  Make xml valid (missing space between attrs)
  Fix info classes file name in xml
  Add note about <eval> tag for errors in xml.md
  Name the tag <eval> if the error id during ev cmd
  Do not print out xml as PHP print...
  Fix output to wrong function
  Fixed parameter order on %.*s
  Too much copypaste...
  ...
2014-10-24 22:28:32 +02:00
Dmitry Stogov
4fd435abab Embed FETCH_CLASS <string> into the following NEW 2014-10-23 11:52:34 +04:00
Anatol Belski
991a04b068 made ext/date and ext/spl use static tsrm ls cache 2014-10-15 12:24:03 +02:00
Tjerk Meesters
1f4f2ef403 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #68128

Conflicts:
	ext/spl/spl_iterators.c
2014-10-14 23:00:17 +08:00
Tjerk Meesters
fb35d7c56e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #68128
2014-10-14 22:50:07 +08:00
Tjerk Meesters
71ba533640 Fixed bug #68128
Three issues are addressed:

- RecursiveRegexIterator::accept() should accept non-empty arrays without
  applying any regular expression and RegexIterator::accept() should not accept
  an array.
- RegexIterator::accept() should not accept an atom that fails to match
  anything, even when PREG_PATTERN_ORDER is used (which would return an array
  of empty arrays).
- RecursiveRegexIterator::getChildren() should pass all constructor arguments
  to its child iterator instead of just the regular expression.
2014-10-14 22:49:01 +08:00
Nikita Popov
471e71537f Remove retval member in spl_dllist
Seems pretty useless, unless I'm missing something?
2014-10-12 20:55:51 +02:00
Nikita Popov
e5e9d8346f Remove zend_get_class_entry function 2014-10-09 14:17:30 +02:00
Nikita Popov
43f1c94dda Review a few more SEPARATE_ZVAL_IF_NOT_REF usages 2014-10-09 12:51:05 +02:00
Dmitry Stogov
bd9a234645 Replaced EG(This) and EX(object) with EX(This).
Internal functions now recieves zend_execute_data as the first argument.
2014-10-03 19:32:46 +04:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00