Fix PHP fatal error when use catalog product flat.