Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFixed the storage functions #378
Conversation
@@ -392,7 +394,9 @@ protected function setupSessionTracking(Client $client, $endpoint, $events) | |||
|
|||
$genericStorage = function ($key, $value = null) use ($cache) { | |||
if (is_null($value)) { | |||
return $cache->get($key, null); | |||
$result = $cache->get($key, []); |
Cawllec
Jan 8, 2020
Author
Contributor
This is what's calling the test failure. The session tracker will utilise whatever is returned from this method in whatever format it's in. Previously this being null was fine by default, as we checked for nulls where necessary. We don't check in the SessionTracker (but maybe we should), as $a - null = $a.
Unfortunately the error being thrown isn't exactly visible due to being deep in docker.
This is what's calling the test failure. The session tracker will utilise whatever is returned from this method in whatever format it's in. Previously this being null was fine by default, as we checked for nulls where necessary. We don't check in the SessionTracker (but maybe we should), as $a - null = $a.
Unfortunately the error being thrown isn't exactly visible due to being deep in docker.
I suggest we solve this in the PHP notifier, as that could be a bit more robust in how it handles values with ambiguous types. For instance there's a null check here, Likewise although it shouldn't need it in the current implementation in Laravel, it would be good to guard here as well. |
Original PR by @GrahamCampbell found at #376
Goal
Fixed the storage functions. Closes bugsnag/bugsnag-php#557.