summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-24 17:32:47 +0000
committerMarcus Boerger <helly@php.net>2003-08-24 17:32:47 +0000
commit19ec7a09fc332d1430bd1488861ef72cb227fca6 (patch)
tree4daef239378b7fc77c1e0bc952aea7c77dc04dc6 /Zend/zend_exceptions.c
parentcec053f70763e9974b48836e37adcc03a8f052b6 (diff)
downloadphp-git-19ec7a09fc332d1430bd1488861ef72cb227fca6.tar.gz
- Provide appropriate way to destroy internal zval's.
- Allow internal zval's of type string and disallow complex types. - Define the default string for extensions at class level instead of ctor.
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 116dbabe19..db0363e939 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -36,7 +36,6 @@ static zend_object_value zend_default_exception_new(zend_class_entry *class_type
zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
- zend_update_property_string(class_type, &obj, "message", sizeof("message")-1, "Unknown exception" TSRMLS_CC);
zend_update_property_string(class_type, &obj, "file", sizeof("file")-1, zend_get_executed_filename(TSRMLS_C) TSRMLS_CC);
zend_update_property_long(class_type, &obj, "line", sizeof("line")-1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC);
@@ -125,7 +124,7 @@ static void zend_register_default_exception(TSRMLS_D)
default_exception_ptr = zend_register_internal_class(&default_exception TSRMLS_CC);
default_exception_ptr->create_object = zend_default_exception_new;
- zend_declare_property_null(default_exception_ptr, "message", sizeof("message")-1, ZEND_ACC_PROTECTED);
+ zend_declare_property_string(default_exception_ptr, "message", sizeof("message")-1, "Unknown exception", ZEND_ACC_PROTECTED);
zend_declare_property_long(default_exception_ptr, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED);
zend_declare_property_null(default_exception_ptr, "file", sizeof("file")-1, ZEND_ACC_PROTECTED);
zend_declare_property_null(default_exception_ptr, "line", sizeof("line")-1, ZEND_ACC_PROTECTED);