Closed white-bear closed 9 years ago
Can't reproduce, see test.
When you call runkit_method_redefine with new doc_comment, it's ok. But when you skip this arg, there is no doc_comment at all. ReflectionMethod->getDocComment() will return bool(false). Probably, it would be better to copy old doc_comment
Fixed
issue found in function php_runkit_method_add_or_update to fix this issue I'm add code, listed below, after 435 line (which is: func.common.function_name = estrndup(methodname, methodname_len);):
ifdef ZEND_ENGINE_2
if (add_or_update == HASH_UPDATE) { func.op_array.doc_comment = estrndup(orig_fe->op_array.doc_comment, orig_fe->op_array.doc_comment_len); func.op_array.doc_comment_len = orig_fe->op_array.doc_comment_len; }
endif
Also there is no way to create function with doc_comment