[doc-en] master: Document the missing ValueErrors for count, dirname, php_uname, dgettext and dngettext (#5996)

From: Date: Thu, 22 Oct 2026 07:59:36 +0000
Subject: [doc-en] master: Document the missing ValueErrors for count, dirname, php_uname, dgettext and dngettext (#5996)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23874@lists.php.net to get a copy of this message
Author: qodelicious (qodelicious) Committer: GitHub (web-flow) Pusher: lacatoire Date: 2026-10-22T09:59:32+02:00 Commit: https://github.com/php/doc-en/commit/17316032fd8980cca8d793614436ee59504d3889 Raw diff: https://github.com/php/doc-en/commit/17316032fd8980cca8d793614436ee59504d3889.diff Document the missing ValueErrors for count, dirname, php_uname, dgettext and dngettext (#5996) Changed paths: M reference/array/functions/count.xml M reference/filesystem/functions/dirname.xml M reference/gettext/functions/dgettext.xml M reference/gettext/functions/dngettext.xml M reference/info/functions/php-uname.xml Diff: diff --git a/reference/array/functions/count.xml b/reference/array/functions/count.xml index ea756d0809a2..df809f2f09d3 100644 --- a/reference/array/functions/count.xml +++ b/reference/array/functions/count.xml @@ -68,6 +68,14 @@ </para> </refsect1> + <refsect1 role="errors"> + &reftitle.errors; + <simpara> + Throws a <exceptionname>ValueError</exceptionname> if <parameter>mode</parameter> + is not <constant>COUNT_NORMAL</constant> or <constant>COUNT_RECURSIVE</constant>. + </simpara> + </refsect1> + <refsect1 role="changelog"> &reftitle.changelog; <informaltable> @@ -79,6 +87,14 @@ </row> </thead> <tbody> + <row> + <entry>8.0.0</entry> + <entry> + Now throws a <exceptionname>ValueError</exceptionname> if + <parameter>mode</parameter> is not <constant>COUNT_NORMAL</constant> or + <constant>COUNT_RECURSIVE</constant>. + </entry> + </row> <row> <entry>8.0.0</entry> <entry> diff --git a/reference/filesystem/functions/dirname.xml b/reference/filesystem/functions/dirname.xml index c17f9622e83e..ab7a0d485794 100644 --- a/reference/filesystem/functions/dirname.xml +++ b/reference/filesystem/functions/dirname.xml @@ -103,6 +103,38 @@ dirname('C:\\'); // Will return 'C:\' on Windows and '.' on *nix systems. </caution> </refsect1> + <refsect1 role="errors"> + &reftitle.errors; + <simpara> + Throws a <exceptionname>ValueError</exceptionname> if <parameter>levels</parameter> + is less than <literal>1</literal>. + </simpara> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + Now throws a <exceptionname>ValueError</exceptionname> if + <parameter>levels</parameter> is less than <literal>1</literal>. + Previously, an <constant>E_WARNING</constant> was raised and &null; was returned. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> diff --git a/reference/gettext/functions/dgettext.xml b/reference/gettext/functions/dgettext.xml index b2706d742b0f..300cb230cf7e 100644 --- a/reference/gettext/functions/dgettext.xml +++ b/reference/gettext/functions/dgettext.xml @@ -54,7 +54,11 @@ &reftitle.errors; <simpara> Throws a <exceptionname>ValueError</exceptionname> if <parameter>domain</parameter> - is the empty <type>string</type>. + is the empty <type>string</type> or longer than 1024 bytes. + </simpara> + <simpara> + Throws a <exceptionname>ValueError</exceptionname> if <parameter>message</parameter> + is longer than 4096 bytes. </simpara> </refsect1> @@ -76,6 +80,14 @@ is the empty <type>string</type>. </entry> </row> + <row> + <entry>8.0.0</entry> + <entry> + Now throws a <exceptionname>ValueError</exceptionname> if an argument + is too long. Previously, an <constant>E_WARNING</constant> was raised + and &false; was returned. + </entry> + </row> </tbody> </tgroup> </informaltable> diff --git a/reference/gettext/functions/dngettext.xml b/reference/gettext/functions/dngettext.xml index 6e713a1d6a6c..814683ae817f 100644 --- a/reference/gettext/functions/dngettext.xml +++ b/reference/gettext/functions/dngettext.xml @@ -69,7 +69,11 @@ &reftitle.errors; <simpara> Throws a <exceptionname>ValueError</exceptionname> if <parameter>domain</parameter> - is the empty <type>string</type>. + is the empty <type>string</type> or longer than 1024 bytes. + </simpara> + <simpara> + Throws a <exceptionname>ValueError</exceptionname> if <parameter>singular</parameter> + or <parameter>plural</parameter> is longer than 4096 bytes. </simpara> </refsect1> @@ -91,6 +95,14 @@ is the empty <type>string</type>. </entry> </row> + <row> + <entry>8.0.0</entry> + <entry> + Now throws a <exceptionname>ValueError</exceptionname> if an argument + is too long. Previously, an <constant>E_WARNING</constant> was raised + and &false; was returned. + </entry> + </row> </tbody> </tgroup> </informaltable> diff --git a/reference/info/functions/php-uname.xml b/reference/info/functions/php-uname.xml index 88f39d0bd207..0fc2b07cb3e5 100644 --- a/reference/info/functions/php-uname.xml +++ b/reference/info/functions/php-uname.xml @@ -97,6 +97,16 @@ </para> </refsect1> + <refsect1 role="errors"> + &reftitle.errors; + <simpara> + Throws a <exceptionname>ValueError</exceptionname> if <parameter>mode</parameter> + is not a single character, or is not one of <literal>"a"</literal>, + <literal>"m"</literal>, <literal>"n"</literal>, <literal>"r"</literal>, + <literal>"s"</literal> or <literal>"v"</literal>. + </simpara> + </refsect1> + <refsect1 role="changelog"> &reftitle.changelog; <informaltable> @@ -111,7 +121,7 @@ <row> <entry>8.4.0</entry> <entry> - Throws a <classname>ValueError</classname> when an invalid + Throws a <exceptionname>ValueError</exceptionname> when an invalid <parameter>mode</parameter> is specified. </entry> </row>

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