summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-02-11 10:23:09 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-02-11 10:23:09 +0100
commitbfbac70ec5d2380adbf88211da313554d0058af9 (patch)
treee0faac4db75aadb42692a5450743052b0d12927b
parent0d3ab673aae771e194bad2ba74e38faddf938704 (diff)
parentcec5e308899febe5692d34c8c5b78e6773284e45 (diff)
downloadphp-git-bfbac70ec5d2380adbf88211da313554d0058af9.tar.gz
Merge branch 'PHP-8.0'
* PHP-8.0: Don't return null from password_get_info()
-rwxr-xr-xext/standard/basic_functions.stub.php2
-rw-r--r--ext/standard/basic_functions_arginfo.h4
-rw-r--r--ext/standard/password.c7
3 files changed, 5 insertions, 8 deletions
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php
index 99d0d3c63d..197af9e3e1 100755
--- a/ext/standard/basic_functions.stub.php
+++ b/ext/standard/basic_functions.stub.php
@@ -1138,7 +1138,7 @@ function unpack(string $format, string $string, int $offset = 0): array|false {}
/* password.c */
-function password_get_info(string $hash): ?array {}
+function password_get_info(string $hash): array {}
function password_hash(string $password, string|int|null $algo, array $options = []): string {}
diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h
index 5eafa59b50..514a0338d5 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: 7540039937587f05584660bc1a1a8a80aa5ccbd1 */
+ * Stub hash: 4f4ed195a688735d48aeb3b7cd390d8463a07c26 */
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)
@@ -1750,7 +1750,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_unpack, 0, 2, MAY_BE_ARRAY|MAY_B
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_password_get_info, 0, 1, IS_ARRAY, 1)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_password_get_info, 0, 1, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO(0, hash, IS_STRING, 0)
ZEND_END_ARG_INFO()
diff --git a/ext/standard/password.c b/ext/standard/password.c
index 0b98199d05..a14dc8dff4 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -584,11 +584,8 @@ PHP_FUNCTION(password_get_info)
zend_string_release(ident);
add_assoc_string(return_value, "algoName", algo->name);
- if (algo->get_info &&
- (FAILURE == algo->get_info(&options, hash))) {
- zval_ptr_dtor_nogc(&options);
- zval_ptr_dtor_nogc(return_value);
- RETURN_NULL();
+ if (algo->get_info) {
+ algo->get_info(&options, hash);
}
add_assoc_zval(return_value, "options", &options);
}