summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-09-17 10:12:10 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-09-17 10:12:10 +0200
commita4f806aa79c9d0e497866e86f750e87d9bd874f1 (patch)
treec7be9dcf737e359e78ccfca180f5c0fb626db5ad
parentedddddcea8086290ddd4cec952f436e5ab31b5b4 (diff)
downloadphp-git-a4f806aa79c9d0e497866e86f750e87d9bd874f1.tar.gz
Fixed bug #80083
Add db2_execute() to the list of functions accessing the local scope. Ideally the API wouldn't do that, but it seems most pragmatic to address this on the opcache side at this point.
-rw-r--r--NEWS3
-rw-r--r--ext/opcache/Optimizer/zend_optimizer.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 00878bde92..05fece0bf5 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 7.3.24
+- OPcache:
+ . Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data
+ binding). (Nikita)
01 Oct 2020, PHP 7.3.23
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c
index 09e68cdbc4..60d766f9d1 100644
--- a/ext/opcache/Optimizer/zend_optimizer.c
+++ b/ext/opcache/Optimizer/zend_optimizer.c
@@ -1079,6 +1079,8 @@ uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args)
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
} else if (zend_string_equals_literal(name, "assert")) {
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (zend_string_equals_literal(name, "db2_execute")) {
+ return ZEND_FUNC_INDIRECT_VAR_ACCESS;
} else if (zend_string_equals_literal(name, "func_num_args")) {
return ZEND_FUNC_VARARG;
} else if (zend_string_equals_literal(name, "func_get_arg")) {