check_log: Catch PHP memory errors