mirror of
https://github.com/php/php-src.git
synced 2025-08-17 06:28:50 +02:00
- Fix crash:
<?php class ResourceFormat { const IMG = 1; } class Image { const RESOURCE_FORMAT = ResourceFormat::IMG; } print_r(constant('Image::RESOURCE_FORMAT')); ?>
This commit is contained in:
parent
0fc9d5861d
commit
f30b51f5b9
1 changed files with 1 additions and 0 deletions
|
@ -266,6 +266,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
|
|||
}
|
||||
|
||||
if (retval) {
|
||||
zval_update_constant(ret_constant, (void*)1 TSRMLS_CC);
|
||||
*result = **ret_constant;
|
||||
zval_copy_ctor(result);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue