1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Commit Graph

13520 Commits

Author SHA1 Message Date
Rudi Theunissen 30156d588c Fixed bug #63217
Don't automatically convert literal string keys to integers on
array access, as we may be dealing with an ArrayAccess object,
rather than a plain array.
2018-07-02 16:41:59 +02:00
Dmitry Stogov 091d77f28a Avoid magic method hash lookups 2018-07-02 17:03:50 +03:00
Dmitry Stogov 43aca3118a Avoid string comparisons for magic methods (all magic methods start with "__") 2018-07-02 17:03:02 +03:00
Nikita Popov 8faa6ef30e Add test for void return type on internal function 2018-06-30 20:14:15 +02:00
Nikita Popov 7909d4532c Merge branch 'PHP-7.2' 2018-06-30 20:11:59 +02:00
Nikita Popov 0f1726e45d Merge branch 'PHP-7.1' into PHP-7.2 2018-06-30 20:11:39 +02:00
Nikita Popov 9b0df97a42 Fix handling of void return type on internal functions 2018-06-30 20:10:57 +02:00
Nikita Popov 43c533d799 Merge branch 'PHP-7.2' 2018-06-29 23:23:08 +02:00
Nikita Popov deb1bad80f Merge branch 'PHP-7.1' into PHP-7.2 2018-06-29 23:23:02 +02:00
Nikita Popov 962706d16c Fix nullable type pretty-printing 2018-06-29 23:22:41 +02:00
Nikita Popov 7ac06d66d4 Add zend_update_static_property_ex API
And cleanup the implementation to perform a normal by-value
assignment.
2018-06-29 22:56:59 +02:00
Nikita Popov 813b6fc950 Add zend_read_static_property_ex API
For symmetry with zend_read_property_ex.
2018-06-29 22:49:15 +02:00
Nikita Popov 10b484e624 Fix build
These were changed in 6e77a60a75.
2018-06-29 22:44:58 +02:00
Dmitry Stogov 6e77a60a75 Removed INIT_OVERLOADED_CLASS... macros 2018-06-29 14:41:35 +03:00
Dmitry Stogov d6ab163be8 cleanup 2018-06-29 12:35:14 +03:00
Nikita Popov 17afe6430f Fixed bug #76439 2018-06-27 14:15:56 +02:00
Dmitry Stogov 716bbd3480 Remove duplicated code (keep destroy_zend_function() for compatibility) 2018-06-27 14:54:42 +03:00
Dmitry Stogov 56450c6e65 Moved very rare exception check into a single place. 2018-06-27 13:34:15 +03:00
Dmitry Stogov 6dc0cd868d Fixed ZTS race condition (zend_class_entry->ce_flags of internal classes must not be modified, because internal class enties are shared between threads) 2018-06-27 12:33:20 +03:00
Xinchen Hui 3d8c82c353 Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler)

Conflicts:
	Zend/zend_vm_execute.h
2018-06-27 13:08:47 +08:00
Xinchen Hui 3521661bd1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler)

Conflicts:
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2018-06-27 13:07:36 +08:00
Xinchen Hui d1b1866a3a Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler) 2018-06-27 13:05:11 +08:00
Dmitry Stogov 1b80de93b8 Cleanup conditions 2018-06-26 16:18:30 +03:00
Dmitry Stogov 8c22d3e729 Make FETCH_R/IS, FETCH_DIM_R/IS, FETCH_OBJ_R/IS, FETCH_STATIC_PROP_R/IS return TMP_VAR, instead of VAR. 2018-06-25 23:43:23 +03:00
Dmitry Stogov 49a4e69584 Fixed ability to call plain functions through zend_call_method() 2018-06-25 23:01:21 +03:00
Dmitry Stogov b89ce98129 typo 2018-06-25 22:43:19 +03:00
Dmitry Stogov 7f67513ca3 Lazy function copying from op_cache SHM into process memory 2018-06-25 19:53:58 +03:00
Dmitry Stogov c8f355b12c Micro-optimization 2018-06-25 17:32:13 +03:00
Nikita Popov 2543e61aed Fixed bug #76509
In PHP static properties are shared between inheriting classes,
unless they are explicitly overwritten. However, because this
functionality was implemented using reference, it was possible
to break the implementation by reassigning the static property
reference.

This is fixed by switching the implementation from using references
to using INDIRECTs, which cannot be affected by userland code.
2018-06-25 15:04:09 +02:00
Nikita Popov 490a49d0bb Use COPY_DEREF for DIM_IS and LIST_R as well
Also add an upgrading note for the behavior change, not that we
expect anyone to be affected...
2018-06-25 14:23:06 +02:00
Nikita Popov 61d00a6cf3 Use COPY_DEREF instead of COPY_UNREF
This fixes the behavior when the storage location of the fetch is
modified before the operand is dereferenced by the using VM opcode.

Furthermore it elimiates references as a possible return value from
*_R opcodes, which will give us more opportunities for inferences,
in particular in regard to typed properties.
2018-06-25 11:23:59 +02:00
COFFEE 19b42bd6b3 numner => number 2018-06-25 08:29:36 +02:00
Nikita Popov 4abf423d75 Merge branch 'PHP-7.2' 2018-06-24 22:29:19 +02:00
Nikita Popov 14b22704c7 Merge branch 'PHP-7.1' into PHP-7.2 2018-06-24 22:28:57 +02:00
Nikita Popov 701460ba84 Fixed bug #76502 2018-06-24 22:26:45 +02:00
Nikita Popov 66cf76ee54 Remove expr_without_variable
We no longer need this distinction.
2018-06-24 13:44:54 +02:00
Nikita Popov b592cd7b98 Merge branch 'PHP-7.2' 2018-06-22 16:23:25 +02:00
Nikita Popov ed9d1b708b Fixed bug #76520 2018-06-22 16:22:04 +02:00
Dmitry Stogov 34e58a6447 Reduced overhead of magic method calls (__get/__set/__unset/__isset/__dectructor/__clone). 2018-06-22 14:29:54 +03:00
Dmitry Stogov 71e18471f2 Merge branch 'PHP-7.2'
* PHP-7.2:
  Added parenthesis
2018-06-22 12:04:49 +03:00
Dmitry Stogov 4a4c72a82a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Added parenthesis
2018-06-22 12:04:39 +03:00
Dmitry Stogov 1f726c9925 Added parenthesis 2018-06-22 12:04:23 +03:00
Dmitry Stogov 73b675a988 Avoid duplication of "shadow" property_info 2018-06-22 02:46:59 +03:00
Dmitry Stogov 4418d61ca3 Avoid reusing zend_function.common.prototype for magic things (use reserved fields instead). 2018-06-21 13:09:25 +03:00
Anatol Belski f87cc89f4d Gereralize VA macro expansion mechanism
Avoids code duplication and makes in usable elsewhere.
2018-06-21 11:50:48 +02:00
Xinchen Hui 7f196c45ef use defined macro 2018-06-18 12:14:00 +08:00
Peter Kokot be49d61b19 Remove old SVN keywords substitutions
When the PHP source code was versioned in Subversion, there was
possible to substitute certain keywords such as $Id$ with revision
number, last change time and author name. Such approach is not used
in Git so this patch removes these outdated artifacts from source
code files.
2018-06-16 13:04:30 +02:00
Nikita Popov d04917c7b3 Fixed bug #75218
I've introduced a new CompileError type, from which ParseError
inherits. These errors are not parse errors in the narrow sense
of the term, even though they happen to be generated during
parsing in our implementation. Additionally reusing the ParseError
class for this purpose would change existing error messages (if
the exception is not caught) from a "Fatal error:" to a "Parse
error:" prefix, and also the error kind from E_COMPILE_ERROR to
E_PARSE.
2018-06-16 12:41:03 +02:00
Nikita Popov 0b04938c87 Fix unspecialized executor
If we conditionally fetch a value, we also need to conditionally
free it.
2018-06-14 23:26:27 +02:00
Michael Moravec a5748cab2e Bump extension, module and PHP API numbers for 7.3 2018-06-14 16:26:13 +02:00