Closed lesaff closed 2 years ago
Hi @lesaff - I can't reproduce that on the latest PW dev. I feel like this might have been a weird one-off glitch where wire('session')
isn't defined for some reason. If you can reproduce this, could you please narrow it down to wire('session')
or wire('session')->tracyWhitelistData
which is set here: https://github.com/adrianbj/TracyDebugger/blob/f5447ffef71caabf8ca759e3631cef1ad8ebb9d6/panels/ConsolePanel.php#L49
Great guess! I was using Redis to store sessions. It works as soon as I uninstall it and switch back to the file-based session.
I am using a modified version of https://github.com/netcarver/PW-SessionHandlerRedis
I've added PW3 compatibility and switched to predis
instead of redis
. I will see if I can debug further. It would be nice if I can still use it along with Tracy Debugger.
@lesaff - I can certainly add an isset()
condition around that foreach()
to prevent the error, but I do use $session
in a few other places. Would it fix things for redis if I used $_SESSION
instead? Or is there some other workaround we could employ?
Since the redis session is just an extension to WireSessionHandler, shouldn't the session output be the same?
Maybe @netcarver might have some thoughts about this, given the connection to his Redis module?
@lesaff - I actually came across this recently myself and it should be fixed in https://github.com/adrianbj/TracyDebugger/commit/caa8428ec4752745373b0c81cbc082ead1cfbeb1 but please re-open if you continue to see it.
Got this error when trying to run a console.
Tracy Debugger version: 4.22.11 PW version: 3.0.185 dev PHP version: 7.4.22