Call me stupid, but I completely stopped understanding what's going on. I suddenly started getting the "Headers already sent by bootstrap.inc" error for anonymous users (and hence for cached pages). After about 3 hours of debugging (because I thought it was something I must have screwed up), I did an actual debug trace in common.inc and found that the error occurred whenever the statistics.module bootstrap was being called.

The freaky thing however is that the attached patch fixes it. I completely don't understand why, as all it does is adds the documented parameter to hook_exit() of statistics. It doesn't use the parameter, it just adds it to the definition of the hook. But whenever I do it, the error disappears completely.

Since I have not experienced the issue earlier, it might be hard to reproduce, for example I was not able to reproduce it with a clean database. As it doesn't hurt adding that parameter to the hook, perhaps it could be done just for consistency.

Thanks,
Waldemar

CommentFileSizeAuthor
statistics-hook-exit.patch407 bytesWaldemar

Comments

Waldemar’s picture

Status: Active » Closed (works as designed)

Sorry this was an incompatibility with the path_access module. Consider this closed.