Please rename variable name by $repository. $er is not authorized (too short)