From 91e42bab2c02fe5e6f694d8e51c37559c1369d6d Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Catoire Date: Sun, 1 Feb 2026 21:42:53 +0100 Subject: [PATCH] Document ValueError for empty filename in getimagesize() --- reference/image/functions/getimagesize.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reference/image/functions/getimagesize.xml b/reference/image/functions/getimagesize.xml index 3f1ca5613fa7..22e187476a39 100644 --- a/reference/image/functions/getimagesize.xml +++ b/reference/image/functions/getimagesize.xml @@ -185,6 +185,10 @@ if ($size && $fp) { getimagesize will generate an error of level E_NOTICE. + + As of PHP 8.0.0, a ValueError is thrown + if filename is empty. + @@ -207,6 +211,14 @@ if ($size && $fp) { and bits and channels were not reported at all. + + 8.0.0 + + A ValueError is now thrown if + filename is empty; previously an + E_WARNING was raised and the function returned &false;. + + 7.1.0