Bug #75681 [Com]: Warning: Narrowing occurred during type inference (specific case)

From: Date: Thu, 14 Dec 2017 03:00:50 +0000
Subject: Bug #75681 [Com]: Warning: Narrowing occurred during type inference (specific case)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213089@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 Comment by: chris at ocproducts dot com Reported by: chris at ocproducts dot com Summary: Warning: Narrowing occurred during type inference (specific case) Status: Open Type: Bug Package: opcache Operating System: Mac OS High Sierra (fully patche PHP Version: 7.2.0 Block user comment: N Private report: N New Comment: Weirdly the fixes do seem to have corrected the issue in the original context in my code. Only my test case now fails. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#213089) next »