1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00

Merge branch 'PHP-8.0'

* PHP-8.0:
  Make finfo_open() $magic_database nullable
This commit is contained in:
Nikita Popov
2021-02-10 12:21:15 +01:00
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ PHP_FUNCTION(finfo_open)
char resolved_path[MAXPATHLEN];
zend_error_handling zeh;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lp", &options, &file, &file_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lp!", &options, &file, &file_len) == FAILURE) {
RETURN_THROWS();
}
+2 -2
View File
@@ -5,7 +5,7 @@
class finfo
{
/** @alias finfo_open */
public function __construct(int $flags = FILEINFO_NONE, string $magic_database = "") {}
public function __construct(int $flags = FILEINFO_NONE, ?string $magic_database = null) {}
/**
* @param resource|null $context
@@ -28,7 +28,7 @@ class finfo
public function set_flags(int $flags) {}
}
function finfo_open(int $flags = FILEINFO_NONE, string $magic_database = ""): finfo|false {}
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false {}
function finfo_close(finfo $finfo): bool {}
+3 -3
View File
@@ -1,9 +1,9 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 6b31c20139e3360cb7ff692cc0d5ccfbfd3812bb */
* Stub hash: 2cd166d444d7324a9fe70170db434c05ccfbf386 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 0, "\"\"")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, _IS_BOOL, 0)
@@ -35,7 +35,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo___construct, 0, 0, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 0, "\"\"")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_file, 0, 0, 1)