summaryrefslogtreecommitdiff
path: root/ext/opcache/Optimizer/compact_literals.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-31 12:25:51 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-31 13:52:06 +0100
commitaad39879f2d2e89de105c4f87d334ee129b4321c (patch)
treec4a0615c40ddaa3596e1c29e4ccbcdf2ae197c05 /ext/opcache/Optimizer/compact_literals.c
parent3d39479f4d7c86c66aa92fc5d0d97fb660109ee9 (diff)
downloadphp-git-aad39879f2d2e89de105c4f87d334ee129b4321c.tar.gz
Remove bareword fallback for constants
Access to undefined constants will now always result in an Error exception being thrown. This required quite a few test changes, because there were many buggy tests that unintentionally used bareword fallback in combination with error suppression.
Diffstat (limited to 'ext/opcache/Optimizer/compact_literals.c')
-rw-r--r--ext/opcache/Optimizer/compact_literals.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c
index 8cc83d2964..8c5702a38d 100644
--- a/ext/opcache/Optimizer/compact_literals.c
+++ b/ext/opcache/Optimizer/compact_literals.c
@@ -171,7 +171,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
LITERAL_INFO(opline->op1.constant, LITERAL_CONST, 1);
break;
case ZEND_FETCH_CONSTANT:
- if ((opline->op1.num & (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) == (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) {
+ if (opline->op1.num & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) {
LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 3);
} else {
LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 2);