summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-31 14:49:16 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-31 14:50:20 +0200
commit8bb2f406def958671e7719966a4c015dfe1e448b (patch)
tree6fffd08bd82aa5528377d242780b0b1072fc2484 /ext/reflection/php_reflection.c
parent41e11a8e715b2a9251a4cc088fde6637cd3c9fd4 (diff)
downloadphp-git-8bb2f406def958671e7719966a4c015dfe1e448b.tar.gz
Check update constant failure in ReflectionClassConstant::__toString()
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index f62dd15e1c..df00e5b4ba 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -547,7 +547,10 @@ static void _class_const_string(smart_str *str, char *name, zend_class_constant
char *visibility = zend_visibility_string(Z_ACCESS_FLAGS(c->value));
char *type;
- zval_update_constant_ex(&c->value, c->ce);
+ if (zval_update_constant_ex(&c->value, c->ce) == FAILURE) {
+ return;
+ }
+
type = zend_zval_type_name(&c->value);
if (Z_TYPE(c->value) == IS_ARRAY) {