Oleksandr, hi!
I have the same issue while trying to install commercial theme on MP4.1 – stop in wp-includes / compat.php on line 30. Theme itself and rest of WP functions are firking fine. I see error whet I’m trying to save Theme Options.
Error occurred only on server, running under FreeBSD – Mac OS, UBUNTU, Debian – working fine. I have a production server running under FreeBSD 10.1, and I won’t migrate to Linux.
Did you solve that error in your case? Any clue?
Thanx!