From: Joshua Rogers Date: Fri, 30 Jan 2015 02:30:17 +0000 (+1100) Subject: Add check for null pointer, as done in case 5 lines above. X-Git-Tag: PRE_PHP7_REMOVALS~21^2~66^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26d5ad6c9803d2243c75cdeff3d471d67f531358;p=php Add check for null pointer, as done in case 5 lines above. --- diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index d02e1ab42c..10b0ae5e84 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -404,7 +404,7 @@ static void zend_append_type_hint(smart_str *str, zend_function *fptr, zend_arg_ if (!strcasecmp(class_name, "self") && fptr->common.scope) { class_name = fptr->common.scope->name->val; class_name_len = fptr->common.scope->name->len; - } else if (!strcasecmp(class_name, "parent") && fptr->common.scope->parent) { + } else if (!strcasecmp(class_name, "parent") && fptr->common.scope && fptr->common.scope->parent) { class_name = fptr->common.scope->parent->name->val; class_name_len = fptr->common.scope->parent->name->len; }