Bug #72698 [NEW]: Function started giving "expected to be a reference, value given"

From: Date: Thu, 28 Jul 2016 07:58:24 +0000
Subject: Bug #72698 [NEW]: Function started giving "expected to be a reference, value given"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202656@lists.php.net to get a copy of this message
From: daniel dot k at siteground dot com Operating system: CentOS PHP version: 7.0.9 Package: Variables related Bug Type: Bug Bug description:Function started giving "expected to be a reference, value given" Description: ------------ After an upgrade from PHP 7.0.8 to 7.0.9 several sites hosted on our infrastructure stopped working. One of the sites is a WordPress site which uses a plugin called W3 Total Cache. The plugin works just fine with PHP 7.0.8 and when PHP 7.0.9 is used the site just gives a blank page. The entries in the logs are: Warning: Parameter 1 to W3_Plugin_Minify::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 Warning: Parameter 1 to W3_Plugin_Cdn::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 Warning: Parameter 1 to W3_PgCache::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 Warning: Parameter 1 to W3_Plugin_Minify::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 Warning: Parameter 1 to W3_Plugin_Cdn::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 Warning: Parameter 1 to W3_PgCache::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 Warning: Parameter 1 to W3_Plugin_Minify::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 Warning: Parameter 1 to W3_Plugin_Cdn::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 Warning: Parameter 1 to W3_PgCache::ob_callback() expected to be a reference, value given in /wp-content/plugins/w3-total-cache/inc/functions/plugin.php on line 23 The issue and the solution are also explained in this blog post: https://www.itnota.com/fixing-php7-compatibility-issue-w3-total-cache/ Other applications such as vBulletin and Joomla! are also experiencing similar issues. The question here is why 7.0.9 causes the sites to go down and the same code works with 7.0.8. -- Edit bug report at https://bugs.php.net/bug.php?id=72698&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72698&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72698&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72698&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72698&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72698&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72698&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72698&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72698&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72698&r=support Expected behavior: https://bugs.php.net/fix.php?id=72698&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72698&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72698&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72698&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72698&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72698&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72698&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72698&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72698&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72698&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72698&r=mysqlcfg

« previous php.bugs (#202656) next »