diff options
author | Reeze Xia <reeze@php.net> | 2015-02-07 19:43:00 +0800 |
---|---|---|
committer | Reeze Xia <reeze@php.net> | 2015-02-07 19:43:00 +0800 |
commit | 61239e1e8bd53260c3c280df3e990e3d303e45bd (patch) | |
tree | 8269202f6e498d0db46f61792224da430b5b89ac /Zend/zend_API.c | |
parent | d9c28c558172281f78b47846357e1f48154d6a32 (diff) | |
download | php-git-61239e1e8bd53260c3c280df3e990e3d303e45bd.tar.gz |
Let's keep it simple
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 260b0628b3..cd7c202007 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2003,16 +2003,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio } if (info->type_hint) { if (info->class_name) { - uint32_t fetch_type; - zend_string *class_name; - ALLOCA_FLAG(use_heap); - - ZEND_ASSERT(info->type_hint == IS_OBJECT); - STR_ALLOCA_INIT(class_name, info->class_name, strlen(info->class_name), use_heap); - fetch_type = zend_get_class_fetch_type(class_name); - STR_ALLOCA_FREE(class_name, use_heap); - - if (fetch_type != ZEND_FETCH_CLASS_DEFAULT && !scope) { + if (!scope && (!strcasecmp(info->class_name, "self") || !strcasecmp(info->class_name, "parent"))) { zend_error(E_CORE_ERROR, "Cannot declare a return type of %s outside of a class scope", info->class_name); } } |