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

[email protected] (Louis-Arnaud Catoire via Christian Weiske) Fri, 6 Mar 2026 07:28:57 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
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>