diff options
author | Xinchen Hui <laruence@gmail.com> | 2019-02-25 14:42:01 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2019-02-25 14:42:01 +0800 |
commit | 3c3d59aa3955416a0b67b2c93174f1989624c8e8 (patch) | |
tree | b4517983ccee5fa9942eb3639f430a888307fe1b /main/streams | |
parent | 900d4cdb9e18c6775d29cb2a53c13e107023c05a (diff) | |
parent | 4a72dd782df3089a0d944a7e51eabebdf1f1abc3 (diff) | |
download | php-git-3c3d59aa3955416a0b67b2c93174f1989624c8e8.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fixed bug #77664 (Segmentation fault when using undefined constant in custom wrapper)
Diffstat (limited to 'main/streams')
-rw-r--r-- | main/streams/userspace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 37479a48e9..3b513cb7f1 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -287,7 +287,10 @@ static void user_stream_create_object(struct php_user_stream_wrapper *uwrap, php } /* create an instance of our class */ - object_init_ex(object, uwrap->ce); + if (object_init_ex(object, uwrap->ce) == FAILURE) { + ZVAL_UNDEF(object); + return; + } if (context) { add_property_resource(object, "context", context->res); |