From, Jordan B.
Jordan - the law of Pennsylvania recognizes that there is a difference between selling marijuana and giving marijuana to a friend. Selling marijuana is a felony offense punishable by up to five years in prison. However, giving a small amount of marijuana to someone for free is a very minor crime, punishable by only thirty days maximum (and usually just a fine).
Title 35 Section 780-113(a)(31) states: "Notwithstanding other subsections of this section, (i) the possession of a small amount of marijuana only for personal use; (ii) the possession of a small amount of marijuana with intent to distribute but not to sell it; or (iii) the distribution of a small amount of marijuana but not for sale" is a misdemeanor punishable by up to thirty days in jail or a five hundred dollar fine.
For purposes of this section, a small amount is defined as less than thirty grams. In case you don't know drug math, Jordan, a quarter ounce is about seven grams, so your situation fits the rule of law I've just described.
Let me make this clear, however. The District Attorney will almost certainly overcharge you with felony possession with intent to distribute, and you will definitely need counsel to fight the charges. Many DA's, and even many judges, are simply unaware of the law in this area. Good luck!