From 3e82816ba1a82843a352ce4050b2010fd9932dee Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 27 Feb 2015 11:42:36 +0800 Subject: [PATCH] Fixed bug #69125 (Array numeric string as key) --- NEWS | 1 + ext/opcache/Optimizer/zend_optimizer.c | 1 + ext/opcache/tests/bug69125.phpt | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 ext/opcache/tests/bug69125.phpt diff --git a/NEWS b/NEWS index f8d653fd5b..a020e6954b 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ PHP NEWS . Fixed bug #68964 (Allowed memory size exhausted with odbc_exec). (Anatol) - Opcache: + . Fixed bug #69125 (Array numeric string as key). (Laruence) . Fixed bug #69038 (switch(SOMECONSTANT) misbehaves). (Laruence) - OpenSSL: diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index ca5d41d8d5..be49b4956b 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -241,6 +241,7 @@ static void update_op2_const(zend_op_array *op_array, case ZEND_ISSET_ISEMPTY_DIM_OBJ: case ZEND_ADD_ARRAY_ELEMENT: case ZEND_INIT_ARRAY: + case ZEND_ASSIGN_DIM: case ZEND_UNSET_DIM: case ZEND_FETCH_DIM_R: case ZEND_FETCH_DIM_W: diff --git a/ext/opcache/tests/bug69125.phpt b/ext/opcache/tests/bug69125.phpt new file mode 100644 index 0000000000..913be01b00 --- /dev/null +++ b/ext/opcache/tests/bug69125.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #69125 (Array numeric string as key) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(4) "okey" +string(4) "okey" -- 2.40.0