From 47b7779329a78ea398201c8db13bf7f66bf32c5b Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 30 Jan 2025 18:10:48 +0100 Subject: [PATCH] Fix return type of error_get_last() Since GH-17056, the result may return the backtrace array. Closes GH-17641 --- Zend/Optimizer/zend_func_infos.h | 2 +- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/Optimizer/zend_func_infos.h b/Zend/Optimizer/zend_func_infos.h index 42435e695a515..0fc33ae2f6e1c 100644 --- a/Zend/Optimizer/zend_func_infos.h +++ b/Zend/Optimizer/zend_func_infos.h @@ -429,7 +429,7 @@ static const func_info_t func_infos[] = { #endif F1("get_current_user", MAY_BE_STRING), FN("get_cfg_var", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE), - F1("error_get_last", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_NULL), + F1("error_get_last", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_NULL), F1("highlight_file", MAY_BE_STRING|MAY_BE_BOOL), F1("php_strip_whitespace", MAY_BE_STRING), F1("highlight_string", MAY_BE_STRING|MAY_BE_TRUE), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 1934610dc0fed..e7f4ff8844714 100644 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1977,7 +1977,7 @@ function get_cfg_var(string $option): string|array|false {} function error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $additional_headers = null): bool {} /** - * @return array|null + * @return array|null * @refcount 1 */ function error_get_last(): ?array {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 61feae1d88c68..3d92288643159 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b0a0ccc94c6db2831f7f0b8e67562cd6a734fcdf */ + * Stub hash: 85677dc3476d25b7820fd3a26fe39f2e9378b6e7 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)