1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00

Late Static Binding make no sense in compile-time constants.

This commit is contained in:
Dmitry Stogov
2007-10-01 11:25:14 +00:00
parent 41e9b6b61c
commit 0625e266cd

View File

@@ -3461,7 +3461,11 @@ void zend_do_fetch_constant(znode *result, znode *constant_container, znode *con
switch (mode) {
case ZEND_CT:
if (constant_container) {
if (ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(constant_container->u.constant), Z_STRLEN(constant_container->u.constant))) {
int type = zend_get_class_fetch_type(Z_STRVAL(constant_container->u.constant), Z_STRLEN(constant_container->u.constant));
if (ZEND_FETCH_CLASS_STATIC == type) {
zend_error(E_ERROR, "\"static::\" is not allowed in compile-time constants");
} else if (ZEND_FETCH_CLASS_DEFAULT == type) {
zend_resolve_class_name(constant_container, &fetch_type, 1 TSRMLS_CC);
}
zend_do_fetch_class_name(NULL, constant_container, constant_name TSRMLS_CC);