From 4aa137c6a624f4f03b04bea60d61872ec490e4f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 10 Apr 2020 18:04:17 +0200 Subject: [PATCH] Fix the default value of the $length parameter of grapheme_substr() --- ext/intl/php_intl.stub.php | 2 +- ext/intl/php_intl_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/intl/php_intl.stub.php b/ext/intl/php_intl.stub.php index dbe905dbef..3154996f00 100644 --- a/ext/intl/php_intl.stub.php +++ b/ext/intl/php_intl.stub.php @@ -245,7 +245,7 @@ function grapheme_strrpos(string $haystack, string $needle, int $offset = 0): in function grapheme_strripos(string $haystack, string $needle, int $offset = 0): int|false {} -function grapheme_substr(string $string, int $start, ?int $length = 0): string|false {} +function grapheme_substr(string $string, int $start, ?int $length = null): string|false {} function grapheme_strstr(string $haystack, string $needle, bool $before_needle = false): string|false {} diff --git a/ext/intl/php_intl_arginfo.h b/ext/intl/php_intl_arginfo.h index ece7aa6ef5..a0a7aa9133 100644 --- a/ext/intl/php_intl_arginfo.h +++ b/ext/intl/php_intl_arginfo.h @@ -463,7 +463,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) -- 2.40.0