I'm getting a syntax error when enabling modules. This is happening intermittently and it isn't specific to any module in particular, which is making it impossible for me to track down. Here is the error I'm receiving today:
Parse error: syntax error, unexpected end of file in sites/all/modules/contrib/headerimage/headerimage.module on line 821
Line 821 is the very last line of the file, and the syntax looks fine to me. When I get a similar error when enabling modules, it's always complaining about the last line. There are never any missing brackets. I've disabled any custom modules I wrote thinking that it could be my code causing this, but I've had no success.
I was wondering if anyone has run into this, if they have any suggestions, or possibly a method to troubleshoot this.
-- EDIT --
I was able to resolve the syntax errors for this particular module (headerimage). I had to delete the very last line in two of the files and re-add them manually. They were closing brackets "}".
I'm not convinced that this is the correct fix. Maybe it's some kind of encoding issue? Any thoughts?