Urban myth!
The Statute Law (Repeals) Act 1976 struck the following clause from s.51 of the London Hackney Carriage Act 1831...
"... if any such Proprietor or Driver, or any Waterman or other Person, shall feed the Horses of or belonging to any Hackney Carriage in any Street, Road, or common Passage, save only with Corn out of a Bag, or with Hay which he shall hold or deliver with his Hands; ... every such Proprietor, Driver, Waterman, or other Person so offending shall forfeit Twenty Shillings."
Thus it was an offence to feed the horse of a Hackney Carriage other than with bagged corn or handled hay, but nowhere was it stipulated from where these foodstuffs were to be obtained and if the Hackney Carriage had no horse then the clause became irrelevant.