Merge branch 'PHP-8.2'

* PHP-8.2:
  Fix GH-9905: constant() behaves inconsistent when class is undefined
This commit is contained in:
Christoph M. Becker 2022-11-09 15:23:51 +01:00
commit 75f372295e
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
3 changed files with 14 additions and 3 deletions

View file

@ -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();
}