com php-src: Add check for null pointer, as done in case 5 lines above.: Zend/zend_inheritance.c
| From: | Xinchen Hui | Date: | Fri, 30 Jan 2015 02:30:17 +0000 |
| Subject: | com php-src: Add check for null pointer, as done in case 5 lines above.: Zend/zend_inheritance.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84447@lists.php.net to get a copy of this message | ||
Commit: 26d5ad6c9803d2243c75cdeff3d471d67f531358
Author: Joshua Rogers <git@internot.info> Fri, 30 Jan 2015 13:30:17 +1100
Parents: 2505aea1535ad2dfd9254939c9c1bbde3085e125
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=26d5ad6c9803d2243c75cdeff3d471d67f531358
Log:
Add check for null pointer, as done in case 5 lines above.
Changed paths:
M Zend/zend_inheritance.c
Diff:
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index d02e1ab..10b0ae5 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;
}