summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorDanack <Danack@basereality.com>2015-03-01 13:20:07 +0000
committerDanack <Danack@basereality.com>2015-03-01 13:20:07 +0000
commita519838ece18dd1babce5b6683b04e99e7816184 (patch)
tree8af2f7367b2bd9c6f7a5c1445e1d1fe88925097e /ext/reflection/php_reflection.c
parent043a02605f7bbf03f8a085354bfa617689a919d3 (diff)
downloadphp-git-a519838ece18dd1babce5b6683b04e99e7816184.tar.gz
Fixed ReflectionExtension and ReflectionProperty.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index a01a0d67c5..6c96acb457 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -4802,7 +4802,14 @@ ZEND_METHOD(reflection_property, __construct)
zend_property_info *property_info = NULL;
property_reference *reference;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs", &classname, &name_str, &name_len) == FAILURE) {
+ int rv;
+ zend_error_handling zeh;
+
+ zend_replace_error_handling(EH_THROW, reflection_exception_ptr, &zeh TSRMLS_CC);
+ rv = zend_parse_parameters(ZEND_NUM_ARGS(), "zs", &classname, &name_str, &name_len);
+ zend_restore_error_handling(&zeh TSRMLS_CC);
+
+ if (rv == FAILURE) {
return;
}
@@ -5197,9 +5204,15 @@ ZEND_METHOD(reflection_extension, __construct)
zend_module_entry *module;
char *name_str;
size_t name_len;
+ int rv;
+ zend_error_handling zeh;
ALLOCA_FLAG(use_heap)
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name_str, &name_len) == FAILURE) {
+ zend_replace_error_handling(EH_THROW, reflection_exception_ptr, &zeh TSRMLS_CC);
+ rv = zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name_str, &name_len);
+ zend_restore_error_handling(&zeh TSRMLS_CC);
+
+ if (rv == FAILURE) {
return;
}
@@ -5566,8 +5579,14 @@ ZEND_METHOD(reflection_zend_extension, __construct)
zend_extension *extension;
char *name_str;
size_t name_len;
+ int rv;
+ zend_error_handling zeh;
+
+ zend_replace_error_handling(EH_THROW, reflection_exception_ptr, &zeh TSRMLS_CC);
+ rv = zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name_str, &name_len);
+ zend_restore_error_handling(&zeh TSRMLS_CC);
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name_str, &name_len) == FAILURE) {
+ if (rv == FAILURE) {
return;
}