mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix #65274: Add class name to undef class constant error
This commit is contained in:
2
NEWS
2
NEWS
@@ -6,6 +6,8 @@ PHP NEWS
|
||||
. Removed the pdo_odbc.db2_instance_name php.ini directive. (Kalle)
|
||||
. Fixed bug #77619 (Wrong reflection on MultipleIterator::__construct).
|
||||
(Fabien Villepinte)
|
||||
. Fixed bug #65274 (Enhance undefined class constant error with class name).
|
||||
(Nikita)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #65547 (Default value for sunrise/sunset zenith still wrong).
|
||||
|
||||
@@ -19,7 +19,7 @@ echo "Done\n";
|
||||
string(6) "string"
|
||||
int(1)
|
||||
|
||||
Fatal error: Uncaught Error: Undefined class constant 'val3' in %s:%d
|
||||
Fatal error: Uncaught Error: Undefined class constant 'test::val3' in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
|
||||
@@ -5485,7 +5485,8 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO
|
||||
}
|
||||
CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
zend_throw_error(NULL, "Undefined class constant '%s::%s'",
|
||||
ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
@@ -5957,7 +5957,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS
|
||||
}
|
||||
CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
zend_throw_error(NULL, "Undefined class constant '%s::%s'",
|
||||
ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
@@ -22760,7 +22761,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_
|
||||
}
|
||||
CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
zend_throw_error(NULL, "Undefined class constant '%s::%s'",
|
||||
ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
@@ -30698,7 +30700,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS
|
||||
}
|
||||
CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
zend_throw_error(NULL, "Undefined class constant '%s::%s'",
|
||||
ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ string(6) "hello2"
|
||||
|
||||
Expecting fatal error:
|
||||
|
||||
Fatal error: Uncaught Error: Undefined class constant 'c19' in %s:%d
|
||||
Fatal error: Uncaught Error: Undefined class constant 'C::c19' in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
|
||||
@@ -21,7 +21,7 @@ B::checkConstants();
|
||||
int(1)
|
||||
int(2)
|
||||
|
||||
Fatal error: Uncaught Error: Undefined class constant 'Z' in %s:11
|
||||
Fatal error: Uncaught Error: Undefined class constant 'B::Z' in %s:11
|
||||
Stack trace:
|
||||
#0 %s(15): B::checkConstants()
|
||||
#1 {main}
|
||||
|
||||
Reference in New Issue
Block a user