On stability and Hopf bifurcation of a model with environmental pollution