The officer was taken to hospital after being injured