Skip to content

Commit ec01a42

Browse files
authored
Document setlocale() incompatibility with integer 0 in PHP 8.5 (#5094)
1 parent b41e78e commit ec01a42

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

appendices/migration85/incompatible.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,12 @@
442442
if the read_and_close value is not a valid type compatible with int.
443443
</simpara>
444444

445+
<simpara>
446+
Passing an integer <literal>0</literal> as the <parameter>locales</parameter>
447+
argument to <function>setlocale</function> is no longer supported and now throws
448+
a <exceptionname>TypeError</exceptionname>.
449+
</simpara>
450+
445451
</sect2>
446452

447453
<sect2 xml:id="migration85.incompatible.simplexml">

reference/strings/functions/setlocale.xml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,29 @@
165165
</para>
166166
</note>
167167
</refsect1>
168-
168+
<refsect1 role="changelog">
169+
&reftitle.changelog;
170+
<informaltable>
171+
<tgroup cols="2">
172+
<thead>
173+
<row>
174+
<entry>&Version;</entry>
175+
<entry>&Description;</entry>
176+
</row>
177+
</thead>
178+
<tbody>
179+
<row>
180+
<entry>8.5.0</entry>
181+
<entry>
182+
Passing an integer <literal>0</literal> as the
183+
<parameter>locales</parameter> argument is no longer supported and
184+
now throws a <classname>TypeError</classname>.
185+
</entry>
186+
</row>
187+
</tbody>
188+
</tgroup>
189+
</informaltable>
190+
</refsect1>
169191
<refsect1 role="examples">
170192
&reftitle.examples;
171193
<para>

0 commit comments

Comments
 (0)