Kodak Black will be entering a drug rehab facility after allegedly testing positive for fentanyl earlier this month.

On Tuesday (Feb. 28), Kodak Black appeared in court after a warrant was issued for his arrest last week. Police say Kodak, 25, failed to give a random drug screening on Feb. 3. He did, however, give a sample during a Feb. 8 screening that allegedly came back positive for fentanyl. During the hearing on Tuesday, Yak's attorney, Bradford Cohen, argued that there is a possibility that the starstruck lab worker who processed the sample may have mixed up Kodak's urine sample while he was also working on someone else's. The lab worker even showed up to court to testify that could have been the case.

Instead of locking up Kodak for violating his pre-trial release, the judge said the rapper could clear everything up by offering a hair sample. Kodak chose to attend a drug rehabilitation facility for 30 days instead. The defense successfully argued to have Kodak's rehab enrollment start next Tuesday (March 7), so he will have the opportunity to perform at his previously scheduled show at the 2023 Rolling Loud California Festival this weekend. He plans to donate a portion of his profits from the show to charity.

Following the court appearance, Bradford Cohen made an Instagram post to share his thoughts on the reporting of the case and the outcome of Kodak Black's hearing.

"Of course channel 10 got it wrong," he captioned an IG photo of himself and Kodak leaving court. "No one refused a Hair sample. Pretrial does not provide Hair sample services," he added, commenting on Local 10 News reporting Kodak refused to give a hair sample in court on Tuesday.

"But I am glad @kodakblack will get an opportunity to take a break from his hectic schedule and focus on his physical health," he continued, commenting on Yak's upcoming stint in rehab. Great kid, great philanthropist and as usual a portion of his Rolling Loud pay check will go to the Meadow Pollack scholarship fund at Nova Southeastern Law School, that he set up last year. @local10news You often see news reports that aren't accurate because they want those subscribers, and won't report on the good in the community and the good Kodak does there as well. Doesn't make for a good story."

Kodak Black is currently out on bond following his arrest on felony drug charges last July after police discovered 30 Oxycodone pills and around $75,000 in the rapper's car during a traffic stop. Kodak's attorney has argued Yak had a prescription for the drugs.

Watch Kodak Black Speak in His Defense in Court Below

See Rappers Named After Notorious Crime Figures

More From KISS FM 96.9