Skip to content

Commit c989395

Browse files
authored
Fix #80671: Update mb_convert_encoding
* Update `mb_convert_encoding` changelog Now throws `ValueError` if either $to_encoding or $from_encoding are passed an invalid encoding, this change was introduced in PHP 8.0 * Add errors section to `mb_convert_encoding` Co-authored-by: George Peter Banyard <[email protected]> Closes GH-582.
1 parent 90997ee commit c989395

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

reference/mbstring/functions/mb-convert-encoding.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@
7070
</para>
7171
</refsect1>
7272

73+
<refsect1 role="errors">
74+
&reftitle.errors;
75+
<para>
76+
As of PHP 8.0.0, a <classname>ValueError</classname> is thrown if the
77+
value of <parameter>to_encoding</parameter> or
78+
<parameter>from_encoding</parameter> is an invalid encoding.
79+
Prior to PHP 8.0.0, a <constant>E_WARNING</constant> was emitted instead.
80+
</para>
81+
</refsect1>
82+
7383
<refsect1 role="changelog">
7484
&reftitle.changelog;
7585
<informaltable>
@@ -81,6 +91,22 @@
8191
</row>
8292
</thead>
8393
<tbody>
94+
<row>
95+
<entry>8.0.0</entry>
96+
<entry>
97+
<function>mb_convert_encoding</function> will now throw a
98+
<classname>ValueError</classname> when
99+
<parameter>to_encoding</parameter> is passed an invalid encoding.
100+
</entry>
101+
</row>
102+
<row>
103+
<entry>8.0.0</entry>
104+
<entry>
105+
<function>mb_convert_encoding</function> will now throw a
106+
<classname>ValueError</classname> when
107+
<parameter>from_encoding</parameter> is passed an invalid encoding.
108+
</entry>
109+
</row>
84110
<row>
85111
<entry>8.0.0</entry>
86112
<entry>

0 commit comments

Comments
 (0)