Skip to content

Commit

Permalink
fix newImage, format is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet authored and Danack committed Jun 15, 2021
1 parent 35e508d commit dc56e4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Imagick.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ public function newImage(
int $columns,
int $rows,
ImagickPixel|string $background_color,
?string $format
string $format=null
): bool {}

// TODO - canvas? description
Expand Down
6 changes: 3 additions & 3 deletions Imagick_arginfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -4450,9 +4450,9 @@ ZEND_END_ARG_INFO()


#if PHP_VERSION_ID >= 80000
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_newImage, 0, 4, _IS_BOOL, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_newImage, 0, 3, _IS_BOOL, 0)
#else
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_newImage, 0, 0, 4)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_newImage, 0, 0, 3)
#endif


Expand All @@ -4470,7 +4470,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_newImage, 0, 0, 4)
ZEND_ARG_OBJ_TYPE_MASK(0, background_color, ImagickPixel, MAY_BE_STRING, NULL)

#if PHP_VERSION_ID >= 80000
ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_STRING, 0, "null")
#else
ZEND_ARG_INFO(0, format)
#endif
Expand Down

0 comments on commit dc56e4b

Please sign in to comment.