You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to return a simple response with "Unauthorized"
returnresponse()->json("Unauthorized", 401)
The variable $data on src/Debugger.php line 117 will then be "Unauthorized".
This will cause a crash on line 123 on the same function when attempting to add the debugging details to the $data variable which is a string, not an object.
First, thanks for the work on this package.
Trying to return a simple response with "Unauthorized"
The variable $data on src/Debugger.php line 117 will then be "Unauthorized".
This will cause a crash on line 123 on the same function when attempting to add the debugging details to the $data variable which is a string, not an object.
This can be easily fixed if a check is added before the information is added to $data variable.
L.E.: I know there is an workaround to change response to:
but would be nice if you could still return something without wrapping it and i would like to not return debug info when an user is not authenticated.
Maybe another idea would be to be able to disable logging on the fly, something like
Debugger::disable();
Version: 3.5.0.
Laravel version: 6.17.1
Please let me know if you need additional information.
The text was updated successfully, but these errors were encountered: