-
-
Notifications
You must be signed in to change notification settings - Fork 221
Description
Version: 2.5.2
Bug Description
While getting it to work/debugging via xdebug in PHP5.4.45 I came across an error message:
message:"syntax error, unexpected '&'"
file:"/var/www/vhosts/.../httpdocs/vendor/tracy/tracy/src/Tracy/assets/Bar/info.panel.phtml"
line:53
This is in the require statement of the panel in DefaultBarPanel.php on line: 50
While setting a breakpoint in the anonymous function in ob_start you can see the error if you run error_get_last() in the debug console.
More info: https://secure.php.net/manual/en/control-structures.foreach.php
"Before PHP 5.5.0, referencing $value is only possible if the iterated array can be referenced (i.e. if it is a variable). The following code works only as of PHP 5.5.0: "
But the required php version is still >=5.4.4 as seen in packagist.
Steps To Reproduce
Running: composer require tracy/tracy in a PHP 5.4.45 environment
Expected Behavior
Debug bar should show up
Possible Solution
Transforming
foreach ([&$packages, &$devPackages] as &$items) {
into
foreach ([&$packages, &$devPackages] as $items) {
Or making it work in 5.4 and 5.5
Or changing required PHP version