summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_default_classes.c6
-rw-r--r--Zend/zend_exceptions.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_default_classes.c b/Zend/zend_default_classes.c
index 4479921544..4bd6850b8f 100644
--- a/Zend/zend_default_classes.c
+++ b/Zend/zend_default_classes.c
@@ -358,7 +358,7 @@ static zend_function_entry default_exception_functions[] = {
{NULL, NULL, NULL}
};
-void zend_cast_exception(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
+int zend_cast_exception(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
{
if (type == IS_STRING) {
zval fname, *retval;
@@ -367,10 +367,10 @@ void zend_cast_exception(zval *readobj, zval *writeobj, int type, int should_fre
if (call_user_function_ex(NULL, &readobj, &fname, &retval, 0, NULL, 0, NULL TSRMLS_CC) == SUCCESS) {
ZVAL_STRING(writeobj, Z_STRVAL_P(retval), 1);
zval_ptr_dtor(&retval);
- return;
+ return SUCCESS;
}
}
- Z_TYPE_P(writeobj) = IS_NULL;
+ return FAILURE;
}
static void zend_register_default_exception(TSRMLS_D)
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 4479921544..4bd6850b8f 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -358,7 +358,7 @@ static zend_function_entry default_exception_functions[] = {
{NULL, NULL, NULL}
};
-void zend_cast_exception(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
+int zend_cast_exception(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
{
if (type == IS_STRING) {
zval fname, *retval;
@@ -367,10 +367,10 @@ void zend_cast_exception(zval *readobj, zval *writeobj, int type, int should_fre
if (call_user_function_ex(NULL, &readobj, &fname, &retval, 0, NULL, 0, NULL TSRMLS_CC) == SUCCESS) {
ZVAL_STRING(writeobj, Z_STRVAL_P(retval), 1);
zval_ptr_dtor(&retval);
- return;
+ return SUCCESS;
}
}
- Z_TYPE_P(writeobj) = IS_NULL;
+ return FAILURE;
}
static void zend_register_default_exception(TSRMLS_D)