Skip to content

sync #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 96 commits into from
Sep 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
6134bf9
Fix parsing regression from PHP 7
cjbj Sep 8, 2020
55afe4e
Yes, and mask the dir path too.
cjbj Sep 8, 2020
16d79d7
Accept updated error number generated by the latest Oracle version
cjbj Sep 8, 2020
ec158c2
Catch type errors so test completes and doesn't diff
cjbj Sep 8, 2020
aae5032
decbin/decoct/dechex optimization.
dstogov Sep 8, 2020
07cb665
Fixed bug #80077
nikic Sep 8, 2020
d0d9c3a
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 8, 2020
d30a648
Merge branch 'PHP-7.4'
nikic Sep 8, 2020
3a5b22e
Revert "Manually build re2c on macos"
nikic Sep 8, 2020
5a201dd
Revert "Update libzip on macos"
nikic Sep 8, 2020
382cb2e
Merge branch 'PHP-7.4'
nikic Sep 8, 2020
259af93
Promote warnings in exif
nikic Sep 8, 2020
3e14942
Require $method parameter in openssl_seal/openssl_open
nikic Sep 8, 2020
ababa22
Support more placeholders in bless_tests.php
nikic Sep 8, 2020
1618997
Merge branch 'PHP-7.4'
nikic Sep 8, 2020
7222315
Promote warnings to errors for set(raw)cookie()
Girgias Jul 7, 2020
2386f65
Always use PCRE for mbstring.http_output_conv_mimetypes
nikic Sep 8, 2020
7e339a3
Make null byte error a ValueError
nikic Sep 8, 2020
3b0fecd
Fix UNKNOWN default values in ext/oci8
kocsismate Sep 7, 2020
02b645e
JIT for FETCH_LIST_R
dstogov Sep 8, 2020
a6a9611
micro-optimization
dstogov Sep 8, 2020
2d1b872
Try to fix setcookie() tests on 32-bit
nikic Sep 8, 2020
9540e70
Run the opcache-only configuration only for scheduled builds
nikic Sep 8, 2020
6e91a2e
Suppress unused variable in snmp
nikic Sep 8, 2020
905c79c
Fix some snmp stubs
nikic Sep 8, 2020
4c43806
add socket_ce and socket_import_file_descriptor in public API
remicollet Sep 8, 2020
e1c422c
Try to fix 32-bit setcookie tests, again
nikic Sep 8, 2020
5dcb8f2
Fix #72941: Modifying bucket->data by-ref has no effect any longer
cmb69 Sep 8, 2020
e6b2a97
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Sep 8, 2020
59c645b
Merge branch 'PHP-7.4' into master
cmb69 Sep 8, 2020
b106463
JIT for IN_ARRAY instruction.
dstogov Sep 8, 2020
5b78d76
mb_str_split is already documented on php.net
alexdowad Sep 8, 2020
cf8d7b3
Don't handle missing value in zend_verify_arg_error()
nikic Sep 8, 2020
95cf7a0
Fix Windows build for shared ext/sockets
cmb69 Sep 8, 2020
73c7fa2
JIT for FETCH_DIM_W/RW insructions
dstogov Sep 8, 2020
311fa34
Fix 3b0fecd and resulting test fail lob_012.phpt
cjbj Sep 9, 2020
40e5238
Flesh out ZEND_HASH_REVERSE_FOREACH_* macros
twose Sep 4, 2020
536e5b4
Pass correct op_info to zend_jit_fetch_dim()
nikic Sep 9, 2020
b553ba7
Avoid use of remote_port in snmp
nikic Sep 8, 2020
d6cc6b2
Tracin JIT support for FETCH_DIM_W/RW with IS_VAR + IS_INDIRECT first…
dstogov Sep 9, 2020
e9d1893
Wildcard output differences in snmp tests
nikic Sep 9, 2020
c5b42be
Fixed memory leak
dstogov Sep 9, 2020
9975986
Improve error messages mentioning parameters instead of arguments
kocsismate Aug 16, 2020
73ab7b3
Allow array_diff() and array_intersect() with single array argument
nikic Sep 8, 2020
712c914
Suppress uninitialized variable warning in snmp
nikic Sep 9, 2020
41f4e91
Mark snmp tests as conflicting
nikic Sep 9, 2020
0222204
Test snmp on azure
nikic Sep 9, 2020
d37d222
Make array_multisort() signature more variadic
nikic Sep 9, 2020
3ab8883
Remove deprecated multi-parameter form of pg_connect()
nikic Sep 9, 2020
8f415d4
Promote pgsql no link to Error exception
nikic Sep 9, 2020
0444158
Promote some warnings in MBString Regexes
Girgias Apr 2, 2020
ee9948b
Eliminate unnecessary exception checks
dstogov Sep 9, 2020
9a6c22d
Remove deprecated pgsql signatures
nikic Sep 9, 2020
47688ab
Add stub for pgsql extension
nikic Sep 9, 2020
25d0e21
Use PGSQL_RETURN_OID() in more places
nikic Sep 9, 2020
6145cac
Fix default value
nikic Sep 9, 2020
68b2193
Use proper int type for parameter
nikic Sep 9, 2020
817ae41
JIT for ASSIGN_DIM[_OP] with first IS_VAR + IS_INDIRECT operand
dstogov Sep 9, 2020
2d4aa1e
Fix #79825: opcache.file_cache causes SIGSEGV with custom opcode hand…
SammyK Jul 10, 2020
1b52682
Merge branch 'PHP-7.3' into PHP-7.4
SammyK Sep 9, 2020
8a5e3e4
Fix opcache return type info for pgsql functions
kocsismate Sep 9, 2020
3861cb8
More pgsql func info fixes
nikic Sep 9, 2020
3375374
Merge branch 'PHP-7.4'
SammyK Sep 9, 2020
1c59bd5
Avoid more exception checks
dstogov Sep 9, 2020
d2efb7e
Eliminate unnecessary IS_INDIRECT guards
dstogov Sep 9, 2020
bea4442
Added FFI\CType::getName() method
chopins Sep 10, 2020
00076ef
Attempt to fix bug #80014 (PHP 8.0 beta2 crashes with default JIT fla…
dstogov Sep 10, 2020
f8f55ba
Fix premature test termination
cjbj Sep 10, 2020
bc508b0
Skip PDO test for Oracle
cjbj Sep 10, 2020
bca32de
Make PDO_OCI test more resilient
cjbj Sep 10, 2020
14657ec
Squash compile warnings the easy way
cjbj Sep 10, 2020
1d8ddf6
Fix azure i386 build, again
nikic Sep 10, 2020
298d2db
Merge branch 'PHP-7.4'
nikic Sep 10, 2020
bd1d11d
Simplify error type filter
twose Sep 10, 2020
7be70c6
fix zend_hash_get_current_key_ex proto
remicollet Sep 10, 2020
8710429
fix zend_hash_get_current_key_type_ex proto
remicollet Sep 10, 2020
0990424
Avoid gap in AST_CLASS child nodes for attributes
TysonAndre Sep 6, 2020
e9b47df
Fixed 32-bit JIT
dstogov Sep 10, 2020
7b0a053
JIT for ASSIGN_OBJ
dstogov Sep 10, 2020
79efbb1
Fix leak in snmp
nikic Sep 10, 2020
ccd0348
Eliminate repeatable class guards and unnecessary IS_UNDEF property c…
dstogov Sep 11, 2020
b89aee4
Add missing condition on azure community job
nikic Sep 11, 2020
9e3e834
Remove the duplicate line in zend_ast.c
Hailong Sep 9, 2020
f33fd9b
Throw ValueError on null bytes in mb_send_mail()
nikic Sep 11, 2020
a59923b
Refactor ReflectionMethod::__construct()
kocsismate Sep 9, 2020
c98d476
Consolidate new union type ZPP macro names
kocsismate Sep 10, 2020
f293e6b
Clean up ext/session errors
kocsismate Sep 10, 2020
dfb3a79
Fix #80067: Omitting the port in bindto setting errors
cmb69 Sep 9, 2020
e418678
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Sep 11, 2020
4d86000
Merge branch 'PHP-7.4' into master
cmb69 Sep 11, 2020
a79008b
Also forbid null bytes in mail()
nikic Sep 11, 2020
b7fe1b6
Make argument type error message consistent for variadics
nikic Sep 9, 2020
f29bfc0
Use string|int union types in pgsql
nikic Sep 11, 2020
cd05b56
Promote some warnings in BCMath to Errors
Girgias Sep 11, 2020
99a6877
Fix mbstring fuzzer
nikic Sep 11, 2020
8446e28
Handle missing result_var in binary_op_result_type
nikic Sep 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ PHP NEWS
. Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate
time). (Derick)

- FFI:
. Added FFI\CType::getName() method. (chopins)

03 Sep 2020, PHP 8.0.0beta3

- Calendar:
Expand Down
21 changes: 19 additions & 2 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ PHP 8.0 UPGRADE NOTES
. Uncaught exceptions now go through "clean shutdown", which means that
destructors will be called after an uncaught exception.
. Compile time fatal error "Only variables can be passed by reference" has
been delayed until runtime and converted to "Cannot pass parameter by
been delayed until runtime and converted to "Argument cannot be passed by
reference" exception.
. Some "Only variables should be passed by reference" notices have been
converted to "Cannot pass parameter by reference" exception.
converted to "Argument cannot be passed by reference" exception.
. The generated name for anonymous classes has changed. It will now include
the name of the first parent or interface:

Expand Down Expand Up @@ -403,6 +403,8 @@ PHP 8.0 UPGRADE NOTES
. The openssl_pkey_free() function is deprecated and no longer has an effect,
instead the OpenSSLAsymmetricKey instance is automatically destroyed if it is no
longer referenced.
. openssl_seal() and openssl_open() now require $method to be passed, as the
previous default of "RC4" is considered insecure.

- PCRE:
. When passing invalid escape sequences they are no longer interpreted as
Expand All @@ -423,6 +425,13 @@ PHP 8.0 UPGRADE NOTES
- PDO_ODBC:
. The php.ini directive pdo_odbc.db2_instance_name has been removed

- pgsql:
. The deprecated pg_connect() syntax using multiple parameters instead of a
connection string is no longer supported.
. The deprecated pg_lo_import() and pg_lo_export() signature that passes the
connection as the last argument is no longer supported. The connection
should be passed as first argument instead.

- Phar:
. Metadata associated with a phar will no longer be automatically unserialized,
to fix potential security vulnerabilities due to object instantiation, autoloading, etc.
Expand Down Expand Up @@ -769,6 +778,14 @@ PHP 8.0 UPGRADE NOTES
. Sorting functions are now stable, which means that equal-comparing elements
will retain their original order.
RFC: https://wiki.php.net/rfc/stable_sorting
. array_diff(), array_intersect() and their variations can now be used with
a single array as argument. This means that usages like the following are
now possible:

// OK even if $excludes is empty.
array_diff($array, ...$excludes);
// OK even if $arrays only contains a single array.
array_intersect(...$arrays);

- Zip:
. Extension updated to version 1.19.0
Expand Down
10 changes: 5 additions & 5 deletions Zend/tests/010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ bool(false)
string(3) "foo"
bool(false)
bool(false)
get_parent_class(): Argument #1 ($object_or_class) must be a valid class name or object, string given
get_parent_class(): Argument #1 ($object_or_class) must be a valid class name or object, string given
get_parent_class(): Argument #1 ($object_or_class) must be a valid class name or object, string given
get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, string given
get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, string given
get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, string given
bool(false)
get_parent_class(): Argument #1 ($object_or_class) must be a valid class name or object, array given
get_parent_class(): Argument #1 ($object_or_class) must be a valid class name or object, int given
get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, array given
get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, int given
Done
2 changes: 1 addition & 1 deletion Zend/tests/arrow_functions/006.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ array(3) {
[2]=>
int(30)
}
{closure}(): Argument #2 ($args) must be of type ?int, string given, called in %s on line %d
{closure}(): Argument #2 must be of type ?int, string given, called in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug46106.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ try {
?>
DONE
--EXPECT--
str_pad() expects at least 2 parameters, 1 given
str_pad() expects at least 2 arguments, 1 given
DONE
2 changes: 1 addition & 1 deletion Zend/tests/bug51827.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ register_shutdown_function('exploDe');
--EXPECT--
int(1)

Fatal error: Uncaught ArgumentCountError: explode() expects at least 2 parameters, 0 given in [no active file]:0
Fatal error: Uncaught ArgumentCountError: explode() expects at least 2 arguments, 0 given in [no active file]:0
Stack trace:
#0 [internal function]: explode()
#1 {main}
Expand Down
21 changes: 9 additions & 12 deletions Zend/tests/bug72038.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,25 @@ Bug #72038 (Function calls with values to a by-ref parameter don't always throw
try {
test($foo = new stdClass);
var_dump($foo);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
} catch (Error $e) {
echo $e->getMessage() . "\n";
}
try {
test($bar = 2);
var_dump($bar);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
try {
test($baz = &$bar);
var_dump($baz);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
} catch (Error $e) {
echo $e->getMessage() . "\n";
}

test($baz = &$bar);
var_dump($baz);

function test(&$param) {
$param = 1;
}

?>
--EXPECT--
Exception: Cannot pass parameter 1 by reference
Exception: Cannot pass parameter 1 by reference
test(): Argument #1 ($param) cannot be passed by reference
test(): Argument #1 ($param) cannot be passed by reference
int(1)
2 changes: 1 addition & 1 deletion Zend/tests/bug72107.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ try {
}
?>
--EXPECT--
func_get_args() expects exactly 0 parameters, 4 given
func_get_args() expects exactly 0 arguments, 4 given
2 changes: 1 addition & 1 deletion Zend/tests/bug73663_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ change(list($val) = $array);
var_dump($array);
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %s:%d
Fatal error: Uncaught Error: change(): Argument #1 ($ref) cannot be passed by reference in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
4 changes: 2 additions & 2 deletions Zend/tests/bug78154.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ namespace Foo {

?>
--EXPECT--
Exception: Cannot pass parameter 3 by reference
Exception: Cannot pass parameter 3 by reference
Exception: similar_text(): Argument #3 ($percent) cannot be passed by reference
Exception: similar_text(): Argument #3 ($percent) cannot be passed by reference
2 changes: 1 addition & 1 deletion Zend/tests/bug79783.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bug #79783: Segfault in php_str_replace_common
str_replace("a", "b", "c", strlen("d"));
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot pass parameter 4 by reference in %s:%d
Fatal error: Uncaught Error: str_replace(): Argument #4 ($replace_count) cannot be passed by reference in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/closure_019.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int(9)
Notice: Only variable references should be returned by reference in %sclosure_019.php on line 4
int(81)

Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %s:%d
Fatal error: Uncaught Error: {closure}(): Argument #1 ($x) cannot be passed by reference in %s:%d
Stack trace:
#0 %s(%d): test()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/errmsg_022.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ foo(1);
echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %s:%d
Fatal error: Uncaught Error: foo(): Argument #1 ($var) cannot be passed by reference in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ try {
}
?>
--EXPECT--
substr() expects at least 2 parameters, 1 given
substr() expects at least 2 arguments, 1 given
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ try {
}

try {
array_diff([]);
array_diff();
} catch (ArgumentCountError $e) {
echo get_class($e) . PHP_EOL;
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
ArgumentCountError
substr() expects at least 2 parameters, 1 given
substr() expects at least 2 arguments, 1 given
ArgumentCountError
At least 2 parameters are required, 1 given
array_diff() expects at least 1 argument, 0 given
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ try {

?>
--EXPECTF--
foo(): Argument #2 ($bar) must be of type int, array given, called in %s on line %d
foo(): Argument #4 ($bar) must be of type int, array given, called in %s on line %d
foo(): Argument #2 must be of type int, array given, called in %s on line %d
foo(): Argument #4 must be of type int, array given, called in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/generators/errors/count_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ try {

?>
--EXPECTF--
Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d
Warning: count(): Argument #1 ($var) must be of type Countable|array, Generator given in %s on line %d
6 changes: 3 additions & 3 deletions Zend/tests/match/027.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ main();
usesValue 0
i is 0

Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %s027.php:20
Fatal error: Uncaught Error: Test::usesRef(): Argument #1 ($x) cannot be passed by reference in %s:%d
Stack trace:
#0 %s027.php(23): main()
#0 %s(%d): main()
#1 {main}
thrown in %s027.php on line 20
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/match/028.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ try {
usesValue 42
usesValue 42
int(42)
Caught Cannot pass parameter 1 by reference
Caught Test::usesRef(): Argument #1 ($x) cannot be passed by reference
2 changes: 1 addition & 1 deletion Zend/tests/named_params/cannot_pass_by_ref.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ try {
}
?>
--EXPECT--
Cannot pass parameter 2 by reference
test(): Argument #2 ($e) cannot be passed by reference
6 changes: 3 additions & 3 deletions Zend/tests/nullsafe_operator/013.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ int(0)
string(98) "call_user_func_array(): Argument #1 ($function) must be a valid callback, no array or string given"
string(77) "call_user_func_array(): Argument #2 ($args) must be of type array, null given"
string(69) "get_class(): Argument #1 ($object) must be of type object, null given"
string(56) "get_called_class() expects exactly 0 parameters, 1 given"
string(55) "get_called_class() expects exactly 0 arguments, 1 given"
string(4) "NULL"
string(53) "func_num_args() expects exactly 0 parameters, 1 given"
string(53) "func_get_args() expects exactly 0 parameters, 1 given"
string(52) "func_num_args() expects exactly 0 arguments, 1 given"
string(52) "func_get_args() expects exactly 0 arguments, 1 given"
string(69) "array_slice(): Argument #1 ($array) must be of type array, null given"
array(1) {
[0]=>
Expand Down
8 changes: 4 additions & 4 deletions Zend/tests/nullsafe_operator/016.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test(new Foo());

?>
--EXPECT--
Cannot pass parameter 1 by reference
Cannot pass parameter 1 by reference
Cannot pass parameter 1 by reference
Cannot pass parameter 1 by reference
set(): Argument #1 ($ref) cannot be passed by reference
set(): Argument #1 ($ref) cannot be passed by reference
set(): Argument #1 ($ref) cannot be passed by reference
set(): Argument #1 ($ref) cannot be passed by reference
2 changes: 1 addition & 1 deletion Zend/tests/str_or_obj_of_class_zpp.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Test Z_PARAM_STR_OR_OBJ_OF_CLASS() and Z_PARAM_STR_OR_OBJ_OF_CLASS_OR_NULL
Test Z_PARAM_OBJ_OF_CLASS_OR_STR() and Z_PARAM_OBJ_OF_CLASS_OR_STR_OR_NULL
--SKIPIF--
<?php
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/str_or_obj_zpp.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Test Z_PARAM_STR_OR_OBJ() and Z_PARAM_STR_OR_OBJ_OR_NULL
Test Z_PARAM_OBJ_OR_STR() and Z_PARAM_OBJ_OR_STR_OR_NULL
--SKIPIF--
<?php
if (!extension_loaded('zend-test')) die('skip zend-test extension not loaded');
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/variadic/by_ref_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test(1);

?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %s:%d
Fatal error: Uncaught Error: test(): Argument #1 cannot be passed by reference in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/variadic/typehint_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ array(3) {
}
}

Fatal error: Uncaught TypeError: test(): Argument #3 ($args) must be of type array, int given, called in %s:%d
Fatal error: Uncaught TypeError: test(): Argument #3 must be of type array, int given, called in %s:%d
Stack trace:
#0 %s(%d): test(Array, Array, 2)
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/variadic/typehint_suppressed_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ try {

?>
--EXPECTF--
string(%d) "test(): Argument #3 ($args) must be of type array, int given, called in %s on line %d"
string(%d) "test(): Argument #3 must be of type array, int given, called in %s on line %d"
39 changes: 15 additions & 24 deletions Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,30 +1311,21 @@ static ZEND_COLD void zend_error_impl(
zend_execute_data *ex;
const zend_op *opline;

switch (type) {
case E_CORE_ERROR:
case E_ERROR:
case E_RECOVERABLE_ERROR:
case E_PARSE:
case E_COMPILE_ERROR:
case E_USER_ERROR:
ex = EG(current_execute_data);
opline = NULL;
while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
ex = ex->prev_execute_data;
}
if (ex && ex->opline->opcode == ZEND_HANDLE_EXCEPTION &&
EG(opline_before_exception)) {
opline = EG(opline_before_exception);
}
zend_exception_error(EG(exception), E_WARNING);
EG(exception) = NULL;
if (opline) {
ex->opline = opline;
}
break;
default:
break;
if (type & E_FATAL_ERRORS) {
ex = EG(current_execute_data);
opline = NULL;
while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
ex = ex->prev_execute_data;
}
if (ex && ex->opline->opcode == ZEND_HANDLE_EXCEPTION &&
EG(opline_before_exception)) {
opline = EG(opline_before_exception);
}
zend_exception_error(EG(exception), E_WARNING);
EG(exception) = NULL;
if (opline) {
ex->opline = opline;
}
}
}

Expand Down
Loading