Just to put closure on this miserable thread, the original report.php works properly on our production server so clearly this is not a Moodle bug but, apparently, an Apple implementation of PHP bug. I'm sorry to have wasted anyone's time on this (and even sorrier that I noticed the problem on my Mac and spent time figuring out the problem when it was specific to my Mac).
Attendance (plugin)
Problem with Attendance Report when displaying by months
This discussion has been locked so you can no longer reply to it.