Hmm...yeah, you can't redefine the function over and over, but defining it once at the beginning (outside any loop) should work, or doing something like:
Code:
if (!function_exists("replace_unicode_escape_sequence")) function replace_unicode_escape_sequence($match){ return mb_convert_encoding(pack('H*', $match[1]), 'HTML-ENTITIES', 'UCS-2BE'); }
Maybe HTML-ENTITES is new to PHP5? Doesn't look like it - or at least it's not listed in the changes.