New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging bar not showing in PHP >= 5.4.4 (error in info.panel.phtml) #317
Comments
Which Tracy version? Master branch targets PHP 7.1, the 2.5.2 is PHP 5.4 compatible. |
Tracy version 2.5.2. |
I see. Caused by d1ec8a2. Probably fixable by: $tmp = [&$packages, &$devPackages];
foreach ($tmp as &$items) {...} |
dg
added a commit
that referenced
this issue
Sep 20, 2018
dg
added a commit
that referenced
this issue
Sep 20, 2018
Fixed, thanks |
dg
added a commit
that referenced
this issue
Sep 20, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: