[doc-en] master: Document ValueError for empty filename in getimagesize()

From: Date: Fri, 06 Mar 2026 07:28:57 +0000
Subject: [doc-en] master: Document ValueError for empty filename in getimagesize()
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23170@lists.php.net to get a copy of this message
Author: Louis-Arnaud Catoire (lacatoire) Committer: Christian Weiske (cweiske) Date: 2026-03-06T08:28:54+01:00 Commit: https://github.com/php/doc-en/commit/6bb90d24b240a0b81e4b203cd8b7ed56bd54033a Raw diff: https://github.com/php/doc-en/commit/6bb90d24b240a0b81e4b203cd8b7ed56bd54033a.diff Document ValueError for empty filename in getimagesize() Changed paths: M reference/image/functions/getimagesize.xml Diff: 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) { <function>getimagesize</function> will generate an error of level <constant>E_NOTICE</constant>. </para> + <para> + As of PHP 8.0.0, a <exceptionname>ValueError</exceptionname> is thrown + if <parameter>filename</parameter> is empty. + </para> </refsect1> <refsect1 role="changelog"> @@ -207,6 +211,14 @@ if ($size && $fp) { and bits and channels were not reported at all. </entry> </row> + <row> + <entry>8.0.0</entry> + <entry> + A <exceptionname>ValueError</exceptionname> is now thrown if + <parameter>filename</parameter> is empty; previously an + <constant>E_WARNING</constant> was raised and the function returned &false;. + </entry> + </row> <row> <entry>7.1.0</entry> <entry>

« previous php.doc.cvs (#23170) next »