PHP Error Displays when not logged in
Closed this issue · 5 comments
It appears above "This report is only available after logging in. Please log in to view."
Warnings for php should be disabled to hide the displayed errors.
error_reporting(E_ALL ^ E_NOTICE);
should be added to the top of the php file
I'm in two minds about suppressing warnings -- on the one hand, it's not good to show them to users, but on the other hand we're outside the Measure policy of trapping all errors and showing friendly help text, because the consumers of the web UI are likely not the people who are able to do anything about such errors. Which errors are you seeing?
This error is because an entry in the cookie does not exist.
Created PR #124 to fix this.
Error is no longer suppressed.
Can you describe how to replicate this? The fix looks good, but I don't think I understand how we got into a situation in the first place where we're looking at a thing that doesn't exist and not handling it correctly.
It's because "MeasureAuth" is not set into the cookie until you do a github login here:
Line 72 in eab0efa
So you have to check if "MeasureAuth" is set in the cookie.
fair -- unclear how I never picked this up before, but obviously I missed it! Nice catch, and I'll merge the fix.