Yes the file belongs to Textpattern. Looks like the code is ensuring that magic quotes are turned off at runtime:
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.