summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-04 18:17:06 +0300
committerDmitry Stogov <dmitry@zend.com>2015-03-04 18:17:06 +0300
commitff039c3c6d16346d53b971885ff7becddb993873 (patch)
tree5f96113fb0c7721897729080ac59ff9b3f86a258 /Zend/zend_API.c
parent13eed2676dc060c0545dad5f4d75362f188548bb (diff)
parent49073fcf382875e1301b94a552de52db226f3d07 (diff)
downloadphp-git-ff039c3c6d16346d53b971885ff7becddb993873.tar.gz
Merge commit 'refs/pull/1066/head' of git://github.com/php/php-src
* git://github.com/php/php-src: Add zend assert deleted by accident Let's keep it simple Improve internal function return types checking for parent
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 3a6dbe5058..304632f762 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2007,8 +2007,8 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
if (info->type_hint) {
if (info->class_name) {
ZEND_ASSERT(info->type_hint == IS_OBJECT);
- if (!strcasecmp(info->class_name, "self") && !scope) {
- zend_error(E_CORE_ERROR, "Cannot declare a return type of self outside of a class 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);
}
}