diff options
author | Joe Watkins <krakjoe@php.net> | 2016-09-30 07:23:19 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2016-09-30 07:23:19 +0100 |
commit | 8ee842b0ea0d94035fe584ca8a3213902bf663b2 (patch) | |
tree | d0b9607429fd8d1194ade376efcd2ef078b0d5a9 /ext/reflection/php_reflection.c | |
parent | 160832e3111fd67f90944ea7ba56e4f9fbf51079 (diff) | |
parent | 1bc3e1b4c38921226d5577fa0621fe4e1d49ad8d (diff) | |
download | php-git-8ee842b0ea0d94035fe584ca8a3213902bf663b2.tar.gz |
Merge branch 'master' of https://github.com/php/php-src
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 16601ee4d6..52d35409d3 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3022,23 +3022,13 @@ ZEND_METHOD(reflection_type, __toString) { reflection_object *intern; type_reference *param; - zend_string *str; if (zend_parse_parameters_none() == FAILURE) { return; } GET_REFLECTION_OBJECT_PTR(param); - str = reflection_type_name(param); - - if (param->arg_info->allow_null) { - size_t orig_len = ZSTR_LEN(str); - str = zend_string_extend(str, orig_len + 1, 0); - memmove(ZSTR_VAL(str) + 1, ZSTR_VAL(str), orig_len + 1); - ZSTR_VAL(str)[0] = '?'; - } - - RETURN_STR(str); + RETURN_STR(reflection_type_name(param)); } /* }}} */ @@ -6711,6 +6701,9 @@ static const zend_function_entry reflection_type_functions[] = { ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) ZEND_ME(reflection_type, allowsNull, arginfo_reflection__void, 0) ZEND_ME(reflection_type, isBuiltin, arginfo_reflection__void, 0) + /* ReflectionType::__toString() is deprecated, but we currently do not mark it as such + * due to bad interaction with the PHPUnit error handler and exceptions in __toString(). + * See PR2137. */ ZEND_ME(reflection_type, __toString, arginfo_reflection__void, 0) PHP_FE_END }; |