diff options
| author | Xinchen Hui <laruence@gmail.com> | 2014-03-02 16:02:32 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2014-03-02 16:07:44 +0800 |
| commit | 26e993a7ae908971acaa9135abd3b6559777e5e5 (patch) | |
| tree | 4715efc39a017b02b47a6bd0fb535197a7c36df4 | |
| parent | 5a9e8a5e26d892c95e5bc0e56ec3241fd312a40f (diff) | |
| download | php-git-26e993a7ae908971acaa9135abd3b6559777e5e5.tar.gz | |
Fixed zend_string
| -rw-r--r-- | ext/reflection/php_reflection.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index d2583621e3..e19a8661cc 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -820,7 +820,7 @@ static void _function_string(string *str, zend_function *fptr, zend_class_entry * swallowed, leading to an unaligned comment. */ if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { - string_printf(str, "%s%s\n", indent, fptr->op_array.doc_comment); + string_printf(str, "%s%s\n", indent, fptr->op_array.doc_comment->val); } string_write(str, indent, strlen(indent)); @@ -3432,7 +3432,7 @@ ZEND_METHOD(reflection_class, getStaticPropertyValue) RETURN_ZVAL(def_value, 1, 0); } else { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, - "Class %s does not have a property named %s", ce->name->val, name); + "Class %s does not have a property named %s", ce->name->val, name->val); } return; } else { @@ -3870,13 +3870,14 @@ ZEND_METHOD(reflection_class, getProperty) str_name = tmp + 2; ce2 = zend_lookup_class(classname TSRMLS_CC); - STR_FREE(classname); if (!ce2) { if (!EG(exception)) { - zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %s does not exist", classname); + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %s does not exist", classname->val); } + STR_FREE(classname); return; } + STR_FREE(classname); if (!instanceof_function(ce, ce2 TSRMLS_CC)) { zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Fully qualified property name %s::%s does not specify a base class of %s", ce2->name->val, str_name, ce->name->val); |
