From 3e43d28e148ab360e5c19988e46f69ca3645f4c2 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Fri, 6 Dec 2024 10:44:22 +0100 Subject: [PATCH] [PHP 8.4] `unserialize()` can throw a `ValueError` and `TypeError` --- reference/var/functions/unserialize.xml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/reference/var/functions/unserialize.xml b/reference/var/functions/unserialize.xml index d39268b42605..8455aafeeb30 100644 --- a/reference/var/functions/unserialize.xml +++ b/reference/var/functions/unserialize.xml @@ -141,9 +141,15 @@ &reftitle.errors; - + Objects may throw Throwables in their unserialization handlers. - + + + As of PHP 8.4.0, if the allowed_classes element of + options is not an array of class names, + unserialize throws TypeErrors + and ValueErrors. + @@ -152,6 +158,14 @@ + + 8.4.0 + + Now throws TypeErrors and + ValueErrors if the allowed_classes + element of options is not an array of class names. + + &Version; &Description;