From 19d0c5dc9f13028f25f5e743e1d05a2eb57a2ea7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 16 Dec 2017 21:24:26 +0100 Subject: [PATCH] Add test for bug #75681 The issue itself has been fixed by 8a4532319dfae83ff16b2d2bbfeed062924c3c27. --- NEWS | 2 ++ ext/opcache/tests/bug75681.phpt | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ext/opcache/tests/bug75681.phpt diff --git a/NEWS b/NEWS index 7dec72ca52..79f9df112f 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,8 @@ PHP NEWS (Laruence, Dmitry) . Fixed bug #75570 ("Narrowing occurred during type inference" error). (Dmitry) + . Fixed bug #75681 (Warning: Narrowing occurred during type inference, + specific case). (Nikita) . Fixed bug #75556 (Invalid opcode 138/1/1). (Laruence) - PCRE: diff --git a/ext/opcache/tests/bug75681.phpt b/ext/opcache/tests/bug75681.phpt new file mode 100644 index 0000000000..72e9d4ace7 --- /dev/null +++ b/ext/opcache/tests/bug75681.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #75681: Warning: Narrowing occurred during type inference (specific case) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +--SKIPIF-- + +--FILE-- + $_) { + $a[$i][0] += 1; + } + + $a[] = array(0, 0); + } while ($x !== false); +} + +?> +===DONE=== +--EXPECT-- +===DONE=== -- 2.40.0