Yes the file belongs to Textpattern. Looks like the code is ensuring that magic quotes are turned off at runtime:
set_magic_quotes_runtime(0);
I guess I could quote out that line, since magic quotes are disabled in the php.ini anyway. (just tried it and it works)
It doesn't really solve the issue of errors being displayed with "display_errors = Off", but is a working fix for now.