summaryrefslogtreecommitdiff
path: root/ext/standard/assert.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2015-06-14 23:52:39 -0500
committerAaron Piotrowski <aaron@trowski.com>2015-06-14 23:52:39 -0500
commit482985ca38a46cef833e9f8be81f909790c8441e (patch)
tree12bc8b5d8597fc2dd631bf2f54650f158e0a2ca2 /ext/standard/assert.c
parent4d590ac35a3a68b8b453cd9bbf3f1300c2507d87 (diff)
downloadphp-git-482985ca38a46cef833e9f8be81f909790c8441e.tar.gz
Changed AssertionException to AssertionError
Diffstat (limited to 'ext/standard/assert.c')
-rw-r--r--ext/standard/assert.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index 236c2c18e9..7054278d70 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -37,7 +37,7 @@ ZEND_END_MODULE_GLOBALS(assert)
ZEND_DECLARE_MODULE_GLOBALS(assert)
-static zend_class_entry *assertion_exception_ce;
+static zend_class_entry *assertion_error_ce;
#ifdef ZTS
#define ASSERTG(v) ZEND_TSRMG(assert_globals_id, zend_assert_globals *, v)
@@ -113,8 +113,8 @@ PHP_MINIT_FUNCTION(assert) /* {{{ */
REGISTER_LONG_CONSTANT("ASSERT_QUIET_EVAL", ASSERT_QUIET_EVAL, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("ASSERT_EXCEPTION", ASSERT_EXCEPTION, CONST_CS|CONST_PERSISTENT);
- INIT_CLASS_ENTRY(ce, "AssertionException", NULL);
- assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default());
+ INIT_CLASS_ENTRY(ce, "AssertionError", NULL);
+ assertion_error_ce = zend_register_internal_class_ex(&ce, zend_get_error());
return SUCCESS;
}
@@ -244,14 +244,14 @@ PHP_FUNCTION(assert)
if (ASSERTG(exception)) {
if (!description) {
- zend_throw_exception(assertion_exception_ce, NULL, E_ERROR);
+ zend_throw_exception(assertion_error_ce, NULL, E_ERROR);
} else if (Z_TYPE_P(description) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(description), assertion_exception_ce)) {
+ instanceof_function(Z_OBJCE_P(description), assertion_error_ce)) {
Z_ADDREF_P(description);
zend_throw_exception_object(description);
} else {
zend_string *str = zval_get_string(description);
- zend_throw_exception(assertion_exception_ce, str->val, E_ERROR);
+ zend_throw_exception(assertion_error_ce, str->val, E_ERROR);
zend_string_release(str);
}
} else if (ASSERTG(warning)) {