Skip to content

Commit 7b8040d

Browse files
committed
[PHP 8.4] unserialize() can throw a ValueError and TypeError を取り込み
1 parent 54ef6bf commit 7b8040d

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

reference/var/functions/unserialize.xml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 3dbbc167de33c0214f454b1d0399a32c88127c10 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: 792c392854b954fc5626c1ac194d516312e51f43 Maintainer: hirokawa Status: ready -->
44
<!-- Credits: mumumu -->
55
<refentry xml:id="function.unserialize" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -145,10 +145,16 @@
145145

146146
<refsect1 role="errors">
147147
&reftitle.errors;
148-
<para>
148+
<simpara>
149149
オブジェクトは、
150150
アンシリアライズを実行するハンドラで <classname>Throwable</classname> をスローしても構いません。
151-
</para>
151+
</simpara>
152+
<simpara>
153+
PHP 8.4.0 以降では、<parameter>options</parameter> の <literal>allowed_classes</literal> 要素が
154+
クラス名の <type>array</type> でない場合、
155+
<function>unserialize</function> は <exceptionname>TypeError</exceptionname> と
156+
<exceptionname>ValueError</exceptionname> をスローします。
157+
</simpara>
152158
</refsect1>
153159

154160
<refsect1 role="changelog">
@@ -157,6 +163,15 @@
157163
<informaltable>
158164
<tgroup cols="2">
159165
<thead>
166+
<row>
167+
<entry>8.4.0</entry>
168+
<entry>
169+
<parameter>options</parameter> の <literal>allowed_classes</literal> 要素が
170+
クラス名の <type>array</type> でない場合、
171+
<exceptionname>TypeError</exceptionname> と <exceptionname>ValueError</exceptionname> を
172+
スローするようになりました。
173+
</entry>
174+
</row>
160175
<row>
161176
<entry>&Version;</entry>
162177
<entry>&Description;</entry>

0 commit comments

Comments
 (0)