diff --git a/generated/8.1/functionsList.php b/generated/8.1/functionsList.php index 0c5a1d2d..818f1a39 100644 --- a/generated/8.1/functionsList.php +++ b/generated/8.1/functionsList.php @@ -225,6 +225,7 @@ 'getcwd', 'gethostname', 'getimagesize', + 'getimagesizefromstring', 'getlastmod', 'getmygid', 'getmyinode', diff --git a/generated/8.1/image.php b/generated/8.1/image.php index 2acc2550..4baee455 100644 --- a/generated/8.1/image.php +++ b/generated/8.1/image.php @@ -22,6 +22,24 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array } +/** + * @param string $string + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null + * @throws ImageException + * + */ +function getimagesizefromstring(string $string, ?array &$image_info = null): ?array +{ + error_clear_last(); + $safeResult = \getimagesizefromstring($string, $image_info); + if ($safeResult === false) { + throw ImageException::createFromPhpError(); + } + return $safeResult; +} + + /** * @param int $image_type * @param bool $include_dot diff --git a/generated/8.1/rector-migrate.php b/generated/8.1/rector-migrate.php index 8f007641..aed3c783 100644 --- a/generated/8.1/rector-migrate.php +++ b/generated/8.1/rector-migrate.php @@ -233,6 +233,7 @@ 'getcwd' => 'Safe\getcwd', 'gethostname' => 'Safe\gethostname', 'getimagesize' => 'Safe\getimagesize', + 'getimagesizefromstring' => 'Safe\getimagesizefromstring', 'getlastmod' => 'Safe\getlastmod', 'getmygid' => 'Safe\getmygid', 'getmyinode' => 'Safe\getmyinode', diff --git a/generated/8.2/functionsList.php b/generated/8.2/functionsList.php index 626dced8..b16ac733 100644 --- a/generated/8.2/functionsList.php +++ b/generated/8.2/functionsList.php @@ -228,6 +228,7 @@ 'getcwd', 'gethostname', 'getimagesize', + 'getimagesizefromstring', 'getlastmod', 'getmygid', 'getmyinode', diff --git a/generated/8.2/image.php b/generated/8.2/image.php index 98d9f7ec..d4e02537 100644 --- a/generated/8.2/image.php +++ b/generated/8.2/image.php @@ -22,6 +22,24 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array } +/** + * @param string $string + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null + * @throws ImageException + * + */ +function getimagesizefromstring(string $string, ?array &$image_info = null): ?array +{ + error_clear_last(); + $safeResult = \getimagesizefromstring($string, $image_info); + if ($safeResult === false) { + throw ImageException::createFromPhpError(); + } + return $safeResult; +} + + /** * @param int $image_type * @param bool $include_dot diff --git a/generated/8.2/rector-migrate.php b/generated/8.2/rector-migrate.php index 9fe4243f..effd3ca1 100644 --- a/generated/8.2/rector-migrate.php +++ b/generated/8.2/rector-migrate.php @@ -236,6 +236,7 @@ 'getcwd' => 'Safe\getcwd', 'gethostname' => 'Safe\gethostname', 'getimagesize' => 'Safe\getimagesize', + 'getimagesizefromstring' => 'Safe\getimagesizefromstring', 'getlastmod' => 'Safe\getlastmod', 'getmygid' => 'Safe\getmygid', 'getmyinode' => 'Safe\getmyinode', diff --git a/generated/8.3/rector-migrate.php b/generated/8.3/rector-migrate.php index 9fe4243f..effd3ca1 100644 --- a/generated/8.3/rector-migrate.php +++ b/generated/8.3/rector-migrate.php @@ -236,6 +236,7 @@ 'getcwd' => 'Safe\getcwd', 'gethostname' => 'Safe\gethostname', 'getimagesize' => 'Safe\getimagesize', + 'getimagesizefromstring' => 'Safe\getimagesizefromstring', 'getlastmod' => 'Safe\getlastmod', 'getmygid' => 'Safe\getmygid', 'getmyinode' => 'Safe\getmyinode', diff --git a/generated/8.4/functionsList.php b/generated/8.4/functionsList.php index 7a193dbf..90cfbf27 100644 --- a/generated/8.4/functionsList.php +++ b/generated/8.4/functionsList.php @@ -228,6 +228,7 @@ 'getcwd', 'gethostname', 'getimagesize', + 'getimagesizefromstring', 'getlastmod', 'getmygid', 'getmyinode', diff --git a/generated/8.4/image.php b/generated/8.4/image.php index be37705b..18cee998 100644 --- a/generated/8.4/image.php +++ b/generated/8.4/image.php @@ -22,6 +22,24 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array } +/** + * @param string $string + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null + * @throws ImageException + * + */ +function getimagesizefromstring(string $string, ?array &$image_info = null): ?array +{ + error_clear_last(); + $safeResult = \getimagesizefromstring($string, $image_info); + if ($safeResult === false) { + throw ImageException::createFromPhpError(); + } + return $safeResult; +} + + /** * @param int $image_type * @param bool $include_dot diff --git a/generated/8.4/rector-migrate.php b/generated/8.4/rector-migrate.php index 638e033f..f4b8fd9f 100644 --- a/generated/8.4/rector-migrate.php +++ b/generated/8.4/rector-migrate.php @@ -236,6 +236,7 @@ 'getcwd' => 'Safe\getcwd', 'gethostname' => 'Safe\gethostname', 'getimagesize' => 'Safe\getimagesize', + 'getimagesizefromstring' => 'Safe\getimagesizefromstring', 'getlastmod' => 'Safe\getlastmod', 'getmygid' => 'Safe\getmygid', 'getmyinode' => 'Safe\getmyinode', diff --git a/generated/8.5/functionsList.php b/generated/8.5/functionsList.php index b092d545..373bf01a 100644 --- a/generated/8.5/functionsList.php +++ b/generated/8.5/functionsList.php @@ -228,6 +228,7 @@ 'getcwd', 'gethostname', 'getimagesize', + 'getimagesizefromstring', 'getlastmod', 'getmygid', 'getmyinode', diff --git a/generated/8.5/rector-migrate.php b/generated/8.5/rector-migrate.php index d582da48..133c9fd1 100644 --- a/generated/8.5/rector-migrate.php +++ b/generated/8.5/rector-migrate.php @@ -236,6 +236,7 @@ 'getcwd' => 'Safe\getcwd', 'gethostname' => 'Safe\gethostname', 'getimagesize' => 'Safe\getimagesize', + 'getimagesizefromstring' => 'Safe\getimagesizefromstring', 'getlastmod' => 'Safe\getlastmod', 'getmygid' => 'Safe\getmygid', 'getmyinode' => 'Safe\getmyinode', diff --git a/generated/8.6/functionsList.php b/generated/8.6/functionsList.php index 9833f03a..e08b53ae 100644 --- a/generated/8.6/functionsList.php +++ b/generated/8.6/functionsList.php @@ -227,6 +227,7 @@ 'getcwd', 'gethostname', 'getimagesize', + 'getimagesizefromstring', 'getlastmod', 'getmygid', 'getmyinode', diff --git a/generated/8.6/image.php b/generated/8.6/image.php index feb2b32c..6f2c4bca 100644 --- a/generated/8.6/image.php +++ b/generated/8.6/image.php @@ -22,6 +22,24 @@ function getimagesize(string $filename, ?array &$image_info = null): ?array } +/** + * @param string $string + * @param array|null $image_info + * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null + * @throws ImageException + * + */ +function getimagesizefromstring(string $string, ?array &$image_info = null): ?array +{ + error_clear_last(); + $safeResult = \getimagesizefromstring($string, $image_info); + if ($safeResult === false) { + throw ImageException::createFromPhpError(); + } + return $safeResult; +} + + /** * @param int $image_type * @param bool $include_dot diff --git a/generated/8.6/rector-migrate.php b/generated/8.6/rector-migrate.php index ba7a9cd9..a2bf73d8 100644 --- a/generated/8.6/rector-migrate.php +++ b/generated/8.6/rector-migrate.php @@ -235,6 +235,7 @@ 'getcwd' => 'Safe\getcwd', 'gethostname' => 'Safe\gethostname', 'getimagesize' => 'Safe\getimagesize', + 'getimagesizefromstring' => 'Safe\getimagesizefromstring', 'getlastmod' => 'Safe\getlastmod', 'getmygid' => 'Safe\getmygid', 'getmyinode' => 'Safe\getmyinode', diff --git a/generator/config/detectErrorType.php b/generator/config/detectErrorType.php index 2ceef5c2..89ce996f 100644 --- a/generator/config/detectErrorType.php +++ b/generator/config/detectErrorType.php @@ -57,6 +57,7 @@ '/mktime<\/function>\s+returns\s+the\s+Unix\s+timestamp\s+of\s+the\s+arguments\s+given./', // mktime before https://github.com/php/doc-en/pull/2651 '/The name of the socket/', // stream_socket_get_name (PHP 8.1) '/&return.falseforfailure.style.procedural;/', // date_create (8.1 - 8.3) + '/See getimagesize<\/function>/', // getimagesizefromstring ]; foreach ($falsies as $falsie) { if (preg_match($falsie, $text)) {