com php-src: Add test for bug #75681: NEWS ext/opcache/tests/bug75681.phpt
| From: | Nikita Popov | Date: | Sat, 16 Dec 2017 20:24:26 +0000 |
| Subject: | com php-src: Add test for bug #75681: NEWS ext/opcache/tests/bug75681.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100618@lists.php.net to get a copy of this message | ||
Commit: 19d0c5dc9f13028f25f5e743e1d05a2eb57a2ea7
Author: Nikita Popov <nikita.ppv@gmail.com> Sat, 16 Dec 2017 21:24:26 +0100
Parents: 8a4532319dfae83ff16b2d2bbfeed062924c3c27
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=19d0c5dc9f13028f25f5e743e1d05a2eb57a2ea7
Log:
Add test for bug #75681
The issue itself has been fixed by 8a4532319dfae83ff16b2d2bbfeed062924c3c27.
Bugs:
https://bugs.php.net/75681
Changed paths:
M NEWS
A ext/opcache/tests/bug75681.phpt
Diff:
diff --git a/NEWS b/NEWS
index 7dec72c..79f9df1 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 0000000..72e9d4a
--- /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--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+function foobar()
+{
+ do {
+ foreach ($a as $i => $_) {
+ $a[$i][0] += 1;
+ }
+
+ $a[] = array(0, 0);
+ } while ($x !== false);
+}
+
+?>
+===DONE===
+--EXPECT--
+===DONE===