Skip to content

Commit cba1664

Browse files
committed
imagecolorsforindex() cannot return false
1 parent 780293b commit cba1664

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ext/gd/gd.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function imagecolorexact(GdImage $image, int $red, int $green, int $blue): int {
153153

154154
function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): ?bool {}
155155

156-
function imagecolorsforindex(GdImage $image, int $color): array|false {}
156+
function imagecolorsforindex(GdImage $image, int $color): array {}
157157

158158
function imagegammacorrect(GdImage $image, float $input_gamma, float $output_gamma): bool {}
159159

ext/gd/gd_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 4efa17e2238f259e359b8f64967677c0ac2abfdb */
2+
* Stub hash: 52bdaaa00be290a14461737675d5ca18ebf9174b */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
55
ZEND_END_ARG_INFO()
@@ -309,7 +309,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagecolorset, 0, 5, _IS_BOOL, 1
309309
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alpha, IS_LONG, 0, "0")
310310
ZEND_END_ARG_INFO()
311311

312-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imagecolorsforindex, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
312+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagecolorsforindex, 0, 2, IS_ARRAY, 0)
313313
ZEND_ARG_OBJ_INFO(0, image, GdImage, 0)
314314
ZEND_ARG_TYPE_INFO(0, color, IS_LONG, 0)
315315
ZEND_END_ARG_INFO()

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ static const func_info_t func_infos[] = {
805805
F1("imagecreatefrombmp", MAY_BE_FALSE | MAY_BE_OBJECT),
806806
#endif
807807
F0("imagecolorset", MAY_BE_NULL | MAY_BE_FALSE),
808-
F1("imagecolorsforindex", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
808+
F1("imagecolorsforindex", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
809809
F1("imagegetclip", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
810810
F1("imageftbbox", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
811811
F1("imagefttext", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),

0 commit comments

Comments
 (0)