There were changes made to that file between 3.1.15 and 3.1.24, but this is the first problem as a result that I’ve heard of. I will do some testing locally and see if I can duplicate the issue with strict mode on.
In the meantime, try adding the code I posted above to your functions.php file.
This reply was modified 6 years, 3 months ago by Chris Reynolds. Reason: added temporary fix