diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-08-22 23:44:38 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-08-22 23:44:38 +0800 |
commit | 434ae90e852ed2b39432baf30d928e26b834c03e (patch) | |
tree | 5e554ff9bdfd263eeb68f2fe8c207c719f6c5d38 /ext/standard/basic_functions.c | |
parent | caf890b29166c8a1c921b7f9d9fa4e6eec02c0dd (diff) | |
download | php-git-434ae90e852ed2b39432baf30d928e26b834c03e.tar.gz |
Fixed bug #72920 (Accessing a private constant using constant() creates an exception AND warning)
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r-- | ext/standard/basic_functions.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 5463665a09..58f9b49151 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -3887,7 +3887,9 @@ PHP_FUNCTION(constant) } } } else { - php_error_docref(NULL, E_WARNING, "Couldn't find constant %s", ZSTR_VAL(const_name)); + if (!EG(exception)) { + php_error_docref(NULL, E_WARNING, "Couldn't find constant %s", ZSTR_VAL(const_name)); + } RETURN_NULL(); } } |