mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fixed bug #65291 - get_defined_constants() crash with __CLASS__ in trait
This commit is contained in:
parent
2b9d42433f
commit
a015fa83a7
3 changed files with 31 additions and 0 deletions
|
@ -1926,6 +1926,11 @@ static int add_constant_info(zend_constant *constant, void *arg TSRMLS_DC)
|
|||
zval *name_array = (zval *)arg;
|
||||
zval *const_val;
|
||||
|
||||
if (!constant->name) {
|
||||
/* skip special constants */
|
||||
return 0;
|
||||
}
|
||||
|
||||
MAKE_STD_ZVAL(const_val);
|
||||
*const_val = constant->value;
|
||||
zval_copy_ctor(const_val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue