Caroline Robboy said she was shopping with her 2-year-old son, Nathaniel, and other family members Sunday when the boy said he needed to go to the bathroom. Robboy asked an employee at the store to use a bathroom and was told the facilities weren't open to the public.
As the family was leaving the store, Nathaniel took matters into his own hands, walking up to a light post and doing his business.
A police officer watching the family came over and wrote Robboy a ticket, which also came with a parenting lecture.
"He said, 'I'm doing this for your own protection because God forbid there might have been a pervert out there looking at my son,'" Robboy told WCAU-TV, Philadelphia.
The mother said she plans to fight the ticket, which carries a $50 fine.
"It's not about the $50," Robboy said. "I want a place that feels friendly to me where my children feel safe and have positive experiences with police officers."
A police department spokesman said the officer was within his authority to write the ticket.