Made log_error safe against NULL string arguments