Hello Joey Baggins,
Thank you for using Apple Support Communities.
To recap, the compass is causing the device to stay stuck in portrait mode. You've come to the right place for a solution.
The first thing you'll want to do is a restart to the device. If after that you're still noticing the problem, it's time to reinstall the iOS.
To perform an iOS reinstall you follow steps 1 through 5 of an unrelated Apple Support article below:
If you can't update or restore your iPhone, iPad, or iPod touch
The article is related to not being able to update but the steps you'll be performing allows you to do the reinstall of the iOS. This provides a fresh download of the software.
Let us know if you have any questions, and again thank you for using Apple Support Communities.
Have a great day!