Don't panic, this is an OLD Moodle BUG that has been around now for over three years...
https://moodle.org/mod/forum/discuss.php?d=147792#p646347
It is not so much where you move from in your Moodle site, but more to do with the page in which you land.
At the moment it appears to be rearing its ugly head in Bootstrap based themes.
If you get this kind of error, please report it here and copy/paste your particular Error message and Stack Trace which is usually listed below the error.
Thanks
Mary