com php-src: Fixed zend_string: ext/reflection/php_refl ection.c
| From: | Dmitry Stogov | Date: | Sun, 02 Mar 2014 08:07:44 +0000 |
| Subject: | com php-src: Fixed zend_string: ext/reflection/php_refl ection.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77817@lists.php.net to get a copy of this message | ||
Commit: 26e993a7ae908971acaa9135abd3b6559777e5e5
Author: Xinchen Hui <laruence@gmail.com> Sun, 2 Mar 2014 16:02:32 +0800
Parents: 5a9e8a5e26d892c95e5bc0e56ec3241fd312a40f
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=26e993a7ae908971acaa9135abd3b6559777e5e5
Log:
Fixed zend_string
Changed paths:
M ext/reflection/php_reflection.c
Diff:
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d258362..e19a866 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);