We had a problem where the unlogged visits file was malformed and this caused the script to go into a cycle of erroring out. We need to add more checks. Basically if we read the file in and it's not false we assume that it has an array of users, we should actually check if that's true. Also later we assume if there is a user it has the correct format, again we should check that, around here:
402: if $unloggedFile['user'].count > 0
and here:
440: uri = URI.parse("https://docs.g......
Not sure about those line numbers as they don't seem to match what I was seeing on the doorbot but they match the copy of log cards I have locally.
We had a problem where the unlogged visits file was malformed and this caused the script to go into a cycle of erroring out. We need to add more checks. Basically if we read the file in and it's not false we assume that it has an array of users, we should actually check if that's true. Also later we assume if there is a user it has the correct format, again we should check that, around here:
and here:
Not sure about those line numbers as they don't seem to match what I was seeing on the doorbot but they match the copy of log cards I have locally.