Pete Davidson and a friend recently had a run-in with the law.

According to an arrest report obtained by PEOPLE, Davidson’s friend and fellow comedian Joey Gay was arrested on Aug. 11 in the town of Fayetteville, New York, at around 4:25 a.m.

Gay, 47, was charged with possession of a controlled substance in the fourth degree and cited with unlawful possession of marijuana. A source tells PEOPLE that the drugs in question were weed edibles.

Davidson, 24, was listed as an "associated person" in the arrest report. According to the source, they were randomly pulled over and Davidson — who has been spending time in upstate New York while filming "Big Time Adolescence" with Machine Gun Kelly — passed a field sobriety test. When authorities searched Gay, they found the weed and weed edibles and arrested him, according to the source.

PEOPLE has reached out to reps for both Davidson and Gay. TMZ was the first to report the news.

The comedians appear to be good friends. In April, Gay posted a selfie of him and Davidson, captioning it: "My son." In July, he posted a photo with Davidson's fiancée Ariana Grande.