mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.2'
* PHP-8.2: Fix GH-9905: constant() behaves inconsistent when class is undefined
This commit is contained in:
commit
75f372295e
3 changed files with 14 additions and 3 deletions
|
@ -519,7 +519,7 @@ PHP_FUNCTION(constant)
|
|||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
scope = zend_get_executed_scope();
|
||||
c = zend_get_constant_ex(const_name, scope, 0);
|
||||
c = zend_get_constant_ex(const_name, scope, ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (!c) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue