History log of /php-src/Zend/zend_API.c (Results 126 – 150 of 1239)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 9975986b 16-Aug-2020 Máté Kocsis

Improve error messages mentioning parameters instead of arguments

Closes GH-5999

# 7e339a33 08-Sep-2020 Nikita Popov

Make null byte error a ValueError

Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do t

Make null byte error a ValueError

Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do this because the error is generated by zpp and
it's easier to always throw TypeError there.

This changes the zpp implementation to throw a TypeError only if
the type is actually wrong and throw ValueError for null bytes.
The error message is also split accordingly, to be more precise.

Closes GH-6094.

show more ...

# 2e218180 04-Sep-2020 Nikita Popov

Release call trampolines in zpp fcc

When using zpp 'f' or Z_PARAM_FUNC, if the fcc points to a call
trampoline release it immediately and force zend_call_function
to refetch it. This

Release call trampolines in zpp fcc

When using zpp 'f' or Z_PARAM_FUNC, if the fcc points to a call
trampoline release it immediately and force zend_call_function
to refetch it. This may require additional callability checks
if __call is used, but avoids the need to carefully free fcc
values in all internal functions -- in some cases this is not
simple, as a type error might be triggered by a later argument
in the same zpp call.

This fixes oss-fuzz #25390.

Closes GH-6073.

show more ...

# f982038f 25-Aug-2020 twosee

Merge branch 'PHP-7.4'

* PHP-7.4:
  Improve error_handing replacement functions

# Conflicts:
# Zend/zend_API.c


# 45ed9b42 30-Aug-2020 twosee

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
Improve error_handing replacement functions


# e9481888 27-Aug-2020 twosee

Improve error_handing replacement functions

We explicitly skip calls to user_error_handler in EH_THROW mode

Closes GH-6050.

# 2c15c9ce 28-Aug-2020 Nikita Popov

Rehash function table after disabling functions

To perform fast shutdown without full table cleanup we need all
internal functions to be in one continuous chunk. This was
violated wh

Rehash function table after disabling functions

To perform fast shutdown without full table cleanup we need all
internal functions to be in one continuous chunk. This was
violated when functions were deleted via disable_functions.

This drops the zend_disable_function() API in favor of
zend_disable_functions(), which disables the given list of
functions and performs the necessary rehash afterwards.

Also drop PG(disabled_functions), which is no longer used.

show more ...

# 138f1416 28-Aug-2020 Nikita Popov

Don't mark variadic functions as ZEND_FASTCALL

Variadic functions do not support the fastcall calling convention.

# fa8d9b11 28-Aug-2020 George Peter Banyard

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functio

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics

Closes GH-6002

show more ...

# 9f05c327 25-Aug-2020 twosee

Remove useless same_zval function

Closes GH-6039.

# 9395e01e 24-Aug-2020 Nikita Popov

Check variadic parameter for type and duplicate name

Set HAS_TYPE_HINTS flag if the variadic parameter is types as well,
and make sure it has a distinct name. This was previously missed,

Check variadic parameter for type and duplicate name

Set HAS_TYPE_HINTS flag if the variadic parameter is types as well,
and make sure it has a distinct name. This was previously missed,
because the variadic parameter is not part of num_args.

show more ...

# befe10fd 14-Aug-2020 Nikita Popov

Fix bug #78770

Refactor the zend_is_callable implementation to check callability
at a particular frame (this is an implementation detail for now,
but could be exposed in the API if u

Fix bug #78770

Refactor the zend_is_callable implementation to check callability
at a particular frame (this is an implementation detail for now,
but could be exposed in the API if useful). Pick the first parent
user frame as the one to check.

show more ...

# 8b77c581 07-Aug-2020 Nikita Popov

Accept zend_object* in zend_update_property

# 01cbb596 07-Aug-2020 Nikita Popov

Accept zend_object* in zend_unset_property

# 7991fc27 07-Aug-2020 Nikita Popov

Accept zend_object in zend_read_property

# bb8b95be 03-Aug-2020 Nikita Popov

Fix bug #79925

If the expected return type of a magic method is "object", we also
need to allow class types and "static" to comply with covariance.

# 5d4659c2 03-Aug-2020 Nikita Popov

Enforce __set_state() parameter type

This fixes one of the issues reported in bug #79925. The parameter
type check for this particular method was missed.

Revision tags: php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1
# e3d06fc7 31-May-2019 Gabriel Caruso

Ensure correct signatures for magic methods

# d92229d8 06-Apr-2020 Nikita Popov

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument nam

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.

RFC: https://wiki.php.net/rfc/named_params

Closes GH-5357.

show more ...

# b2248789 29-Jul-2020 George Peter Banyard

Implement 'Saner Numeric Strings' RFC:

RFC: https://wiki.php.net/rfc/saner-numeric-strings

This removes the -1 allow_error mode from is_numeric_string functions and replaces it by

Implement 'Saner Numeric Strings' RFC:

RFC: https://wiki.php.net/rfc/saner-numeric-strings

This removes the -1 allow_error mode from is_numeric_string functions and replaces it by
a trailing boolean out argument to preserve BC in a couple of places.

Most of the changes can be resumed to "numeric" strings which emitted a E_NOTICE now emit
a E_WARNING and "numeric" strings which emitted a E_WARNING now throw a TypeError.

This mostly affects:
- String offsets
- Arithmetic operations
- Bitwise operations

Closes GH-5762

show more ...

# 236ddc56 20-Jul-2020 Nikita Popov

Preserve original ce_flags when registering class

Bug that regularly sneaks in: ZEND_ACC_FINAL is set before calling
zend_register_internal_class() and promptly gets ignored. Remove

Preserve original ce_flags when registering class

Bug that regularly sneaks in: ZEND_ACC_FINAL is set before calling
zend_register_internal_class() and promptly gets ignored. Remove
this footgun by preserving flags from the original CE.

show more ...

# 7fd4212c 20-Jul-2020 Nikita Popov

Add common code for magic method assignment

This was repeated three times.

# efce3694 20-Jul-2020 Nikita Popov

Directly assign magic methods

Instead of going through intermediary variables.

# 91e5452b 20-Jul-2020 Nikita Popov

Remove unused lc_class_name variable

This is probably a leftover from "old style constructor" support.

# 19de727e 20-Jul-2020 Nikita Popov

Report magic method names as written

Report the name the way the user has written it, the same way we
always do.

12345678910>>...50