Skip to content

Commit 8162b94

Browse files
committed
Fixed Error to Exception
1 parent fc320a9 commit 8162b94

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/bcmath/bcmath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ PHP_METHOD(BcMath_Number, __unserialize)
17401740
return;
17411741

17421742
fail:
1743-
zend_throw_error(NULL, "Invalid serialization data for %s object", ZSTR_VAL(bcmath_number_ce->name));
1743+
zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %s object", ZSTR_VAL(bcmath_number_ce->name));
17441744
RETURN_THROWS();
17451745
}
17461746

ext/bcmath/tests/number/unserialize_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ bcmath
66
<?php
77
try {
88
unserialize('O:13:"BcMath\Number":1:{s:5:"value";s:1:"a";}');
9-
} catch (Error $e) {
9+
} catch (Exception $e) {
1010
echo $e->getMessage();
1111
}
1212
?>

0 commit comments

Comments
 (0)