Skip to content

Commit 13173ef

Browse files
committed
Add UnserializationFailedException
1 parent 3ba7756 commit 13173ef

File tree

5 files changed

+30
-1
lines changed

5 files changed

+30
-1
lines changed

ext/standard/basic_functions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
296296
php_ce_incomplete_class = register_class___PHP_Incomplete_Class();
297297
php_register_incomplete_class_handlers();
298298

299+
php_var_ce_UnserializationFailedException = register_class_UnserializationFailedException(zend_ce_exception);
300+
299301
assertion_error_ce = register_class_AssertionError(zend_ce_error);
300302

301303
#ifdef ENABLE_TEST_CLASS

ext/standard/basic_functions.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,6 +2849,13 @@ function memory_get_peak_usage(bool $real_usage = false): int {}
28492849

28502850
function memory_reset_peak_usage(): void {}
28512851

2852+
/**
2853+
* @strict-properties
2854+
*/
2855+
class UnserializationFailedException extends \Exception
2856+
{
2857+
}
2858+
28522859
/* versioning.c */
28532860

28542861
/** @compile-time-eval */

ext/standard/basic_functions_arginfo.h

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/standard/php_var.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
PHP_MINIT_FUNCTION(var);
2424

25+
extern PHPAPI zend_class_entry *php_var_ce_UnserializationFailedException;
26+
2527
PHPAPI void php_var_dump(zval *struc, int level);
2628
PHPAPI void php_var_export(zval *struc, int level);
2729
PHPAPI void php_var_export_ex(zval *struc, int level, smart_str *buf);

ext/standard/var.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ struct php_serialize_data {
3535
uint32_t n;
3636
};
3737

38+
PHPAPI zend_class_entry *php_var_ce_UnserializationFailedException;
39+
3840
#define COMMON (is_ref ? "&" : "")
3941

4042
static void php_array_element_dump(zval *zv, zend_ulong index, zend_string *key, int level) /* {{{ */

0 commit comments

Comments
 (0)