Skip to content

Commit 00b116e

Browse files
committed
Add UnserializationFailedException
1 parent 1553334 commit 00b116e

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
@@ -294,6 +294,8 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
294294
php_ce_incomplete_class = register_class___PHP_Incomplete_Class();
295295
php_register_incomplete_class_handlers();
296296

297+
php_var_ce_UnserializationFailedException = register_class_UnserializationFailedException(zend_ce_exception);
298+
297299
assertion_error_ce = register_class_AssertionError(zend_ce_error);
298300

299301
#ifdef ENABLE_TEST_CLASS

ext/standard/basic_functions.stub.php

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

23652365
function memory_reset_peak_usage(): void {}
23662366

2367+
/**
2368+
* @strict-properties
2369+
*/
2370+
class UnserializationFailedException extends \Exception
2371+
{
2372+
}
2373+
23672374
/* versioning.c */
23682375

23692376
/** @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)