Skip to content

unserialize() の更新を取り込み #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions reference/var/functions/unserialize.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 3dbbc167de33c0214f454b1d0399a32c88127c10 Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: d75036c386e37ce56dafb7607b72aedc3e33fe09 Maintainer: hirokawa Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.unserialize" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -90,7 +90,7 @@
<tbody>
<row>
<entry><literal>allowed_classes</literal></entry>
<entry><type>mixed</type></entry>
<entry><type>array|bool</type></entry>
<entry>
<simpara>
受け付けるクラス名の配列を指定します。あらゆるクラスを拒否する場合は
Expand Down Expand Up @@ -145,10 +145,16 @@

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

<refsect1 role="changelog">
Expand All @@ -163,6 +169,15 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<parameter>options</parameter> の <literal>allowed_classes</literal> 要素が
クラス名の <type>array</type> でない場合、
<exceptionname>TypeError</exceptionname> と <exceptionname>ValueError</exceptionname> を
スローするようになりました。
</entry>
</row>
<row>
<entry>8.3.0</entry>
<entry>
Expand Down