From: Nikita Popov Date: Sat, 16 Dec 2017 20:24:26 +0000 (+0100) Subject: Add test for bug #75681 X-Git-Tag: php-7.2.2RC1~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19d0c5dc9f13028f25f5e743e1d05a2eb57a2ea7;p=php Add test for bug #75681 The issue itself has been fixed by 8a4532319dfae83ff16b2d2bbfeed062924c3c27. --- 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===