Bug #76711 [NEW]: OPcache enabled triggers false-positive "Illegal string offset"

From: Date: Mon, 06 Aug 2018 14:08:38 +0000
Subject: Bug #76711 [NEW]: OPcache enabled triggers false-positive "Illegal string offset"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216636@lists.php.net to get a copy of this message
From: nicolas dot grekas+php at gmail dot com Operating system: PHP version: 7.3Git-2018-08-06 (Git) Package: opcache Bug Type: Bug Bug description:OPcache enabled triggers false-positive "Illegal string offset" Description: ------------ when running the Symfony test suite on PHP 7.3 with opcache.enable_cli=1, some tests fail with "Illegal string offset '...'" errors, which make no sense: Example build is: https://travis-ci.org/nicolas-grekas/symfony/builds/411802579#L2508 The reported line reads as such: > if (!$uri || '#' == $uri[0] || '?' == $uri[0]) { See https://github.com/symfony/symfony/blob/master/src/Symfony/Component/BrowserKit/Client.php#L668 It looks like there is a leak from L649 to L668: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/BrowserKit/Client.php#L649 Test script: --------------- No better reproducer sorry: git clone https://github.com/symfony/symfony cd symfony composer install ./phpunit install php -dopcache.enable_cli=1 ./phpunit src/Symfony/Component/BrowserKit -- Edit bug report at https://bugs.php.net/bug.php?id=76711&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76711&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76711&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76711&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76711&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76711&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76711&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76711&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76711&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76711&r=support Expected behavior: https://bugs.php.net/fix.php?id=76711&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76711&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76711&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76711&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76711&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76711&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76711&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76711&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76711&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76711&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76711&r=mysqlcfg

« previous php.bugs (#216636) next »