HARRISBURG, Pa. (AP) — A prison inmate in Pennsylvania who asked for an onion-free meal plan was denied his request after a court said it was frivolous.

Pennlive.com reports Friday a state appeals court agreed with a county judge that William Mayo’s civil rights were not violated.

Mayo said he was allergic to onions and was placed on a special diet that excluded them.

Mayo complained to the prison’s dietary department when tomatoes, peppers and spices were also cut out of his food. He was told to get medical permission but refused and sued the prison.

Medical testing later showed he was not allergic to onions.

The prison then took him off the special diet, prompting him to expand his original complaint and claim cruel and unusual punishment.

The 40-year-old is serving a life sentence for a 2002 murder in Philadelphia.

(Copyright (c) 2020 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)