Bug #75681 [Opn->Csd]: Warning: Narrowing occurred during type inference (specific case)
| From: | nikic@php.net | Date: | Sat, 16 Dec 2017 20:26:54 +0000 |
| Subject: | Bug #75681 [Opn->Csd]: Warning: Narrowing occurred during type inference (specific case) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213133@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75681&edit=1
ID: 75681
Updated by: nikic@php.net
Reported by: chris at ocproducts dot com
Summary: Warning: Narrowing occurred during type inference
(specific case)
-Status: Open
+Status: Closed
Type: Bug
Package: opcache
Operating System: Mac OS High Sierra (fully patche
PHP Version: 7.2.0
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Fixed by https://github.com/php/php-src/commit/8a4532319dfae83ff16b2d2bbfeed062924c3c27,
test added in https://github.com/php/php-src/commit/19d0c5dc9f13028f25f5e743e1d05a2eb57a2ea7.
Previous Comments:
------------------------------------------------------------------------
[2017-12-14 03:00:49] chris at ocproducts dot com
Weirdly the fixes do seem to have corrected the issue in the original context in my code.
Only my test case now fails.
------------------------------------------------------------------------
[2017-12-14 02:54:59] chris at ocproducts dot com
Description:
------------
Running on the latest of everything, the attached reduced test case fails when opcache is enabled.
"Warning: Narrowing occurred during type inference. Please file a bug report on bugs.php.net in
Unknown on line 0"
It is affecting Composr CMS, we found it from in the wild for customer(s) upgraded to PHP 7.2.
This is not fixed by these commits:
https://github.com/php/php-src/commit/776bef8447f2848c043e4716a1e08c4ac5a88fdb
https://github.com/php/php-src/commit/5934bff91337b876195e9290b0811240052be7a3
I also confirmed it is not fixed in git HEAD.
Test script:
---------------
<?php
function foobar()
{
do {
foreach ($a as $i => $_) {
$a[$i][0] += 1;
}
$a[] = array(0, 0);
} while ($x !== false);
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75681&edit=1