Fix GH-1611: mb-internal-encoding() throws ValueError on unknown encoding

Closes GH-1613.

Signed-off-by: Yann 'Ze' Richard <ze@nbox.org>
This commit is contained in:
Yann 'Ze' Richard 2022-06-06 16:28:30 +02:00 committed by GitHub
parent e5caf1244e
commit 5b3fc18be0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,15 @@
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
As of PHP 8.0.0, a <classname>ValueError</classname> is thrown if the
value of <parameter>encoding</parameter> is an invalid encoding.
Prior to PHP 8.0.0, a <constant>E_WARNING</constant> was emitted instead.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
@ -60,6 +69,14 @@
</thead>
<tbody>
&mbstring.changelog.encoding-nullable;
<row>
<entry>8.0.0</entry>
<entry>
Now throws a <classname>ValueError</classname> if
<parameter>encoding</parameter> is an invalid encoding.
Previously a <constant>E_WARNING</constant> was emitted instead.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>