From 17fa9b77bdc6f88ac5017a5648ea48ebfb18802f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 12 Oct 2021 00:01:09 +0200 Subject: [PATCH 1/2] Fix the return type of imagecolorexactalpha() --- ext/gd/gd.stub.php | 2 +- ext/gd/gd_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/gd/gd.stub.php b/ext/gd/gd.stub.php index 2030d2b565f..a4f30a3f402 100644 --- a/ext/gd/gd.stub.php +++ b/ext/gd/gd.stub.php @@ -40,7 +40,7 @@ function imagecolorresolvealpha(GdImage $image, int $red, int $green, int $blue, function imagecolorclosestalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {} -function imagecolorexactalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {} +function imagecolorexactalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {} function imagecopyresampled(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {} diff --git a/ext/gd/gd_arginfo.h b/ext/gd/gd_arginfo.h index b06497c673a..c51846bc7c4 100644 --- a/ext/gd/gd_arginfo.h +++ b/ext/gd/gd_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 52bdaaa00be290a14461737675d5ca18ebf9174b */ + * Stub hash: c45bd3923e6c65a869b39822f574bde363a3499f */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -91,7 +91,7 @@ ZEND_END_ARG_INFO() #define arginfo_imagecolorclosestalpha arginfo_imagecolorresolvealpha -#define arginfo_imagecolorexactalpha arginfo_imagecolorallocatealpha +#define arginfo_imagecolorexactalpha arginfo_imagecolorresolvealpha ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagecopyresampled, 0, 10, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, dst_image, GdImage, 0) From 2127b49c6565b4affa8a71cda5058ba17af679ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 12 Oct 2021 00:02:22 +0200 Subject: [PATCH 2/2] String default values are enclosed in quotes rather than apostrophes --- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 243e7798b2a..acdb56af3ec 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -655,7 +655,7 @@ function setlocale(int $category, $locales, ...$rest): string|false {} /** @param array $result */ function parse_str(string $string, &$result): void {} -function str_getcsv(string $string, string $separator = ",", string $enclosure = "\"", string $escape = '\\'): array {} +function str_getcsv(string $string, string $separator = ",", string $enclosure = "\"", string $escape = "\\"): array {} function str_repeat(string $string, int $times): string {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 77f3662d2c6..bbd4a16899b 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: 963bd7624ec5f981ac9074eef94f9da740aa5108 */ + * Stub hash: 2da40c5fd9726f98ff96cf9fb5e0c41521e1e6ae */ 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) @@ -1020,7 +1020,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_getcsv, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\",\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enclosure, IS_STRING, 0, "\"\\\"\"") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\'\\\\\'") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, escape, IS_STRING, 0, "\"\\\\\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_repeat, 0, 2, IS_STRING, 0)