Domhnall Gleeson sprained his ankle and back while filming the 'Peter Rabbit' movie.

The 34-year-old actor stars as Thomas McGregor in the new live action/CGI comedy directed by Will Gluck, but Gleeson has admitted filming the adaptation of the beloved Beatrix Potter character was more painful than he anticipated.

He told the Daily Star newspaper: ''I sprained my ankle, and then I did my back and my ribs and stuff, so it just kept spreading up my body.''

'Peter Rabbit' stars James Corden as the voice of the mischievous bunny created by the British children's author.

However, the film has been forced to apologise for offending allergy sufferers.

A scene in the new big screen adaptation shows a character called McGregor, who has a blackberry allergy, being pelted with the fruit by Peter Rabbit and a gang of bunnies, before he is eventually forced to use an EpiPen to recover from the attack.

Sony Pictures released a joint statement saying the film ''should not have made light'' of a character being allergic to blackberries ''even in a cartoonish, slapstick way''.

The studio added: ''We sincerely regret not being more aware and sensitive to this issue, and we truly apologise.''

The apology was prompted after charity Kids with Food Allergies published a statement on Facebook saying ''food allergy jokes are harmful to our community'', sparking the hashtag #boycottpeterrabbit to trend on Twitter.

The charity's post read: ''The very real fear and anxiety that people experience during an allergic reaction (often referred to as an impending sense of doom) is a serious matter.

''Making light of this condition hurts our members because it encourages the public not to take the risk of allergic reactions seriously, and this cavalier attitude may make them act in ways that could put an allergic person in danger.''

A petition calling for Sony Pictures to apologise quickly attracted more than 9,000 signatures.