Just days before being sentenced to the crappiest place on earth, “Lean On Me” actor Jermaine Hopkins paid a visit to the most MAGICAL place on earth — Disney World — and it was all in an effort to spend some last-minute time with his family.

As we previously reported, Hopkins — who starred as troubled youth Thomas Sams in the 1989 classic — was arrested in Arizona back in December for buying 200 pounds of weed from an undercover cop.

Jermaine tells us, he was nervous about spending time in the clink … so he consulted a pastor in Newark, New Jersey — coincidentally, Whitney Houston’s old pastor — who advised Jermaine to spend quality time with his family while he still could.

Jermaine took the pastor’s advice — and immediately flew his family down to Orlando to Disney World this week.

Jermaine tells us, it was the first time he and his kids had ever been there — adding, “We had a great time!”

Jermaine is scheduled to be sentenced on Tuesday. He faces up to five years in prison.