summaryrefslogtreecommitdiff
path: root/it_xml.class
diff options
context:
space:
mode:
authorChristian Schneider2012-02-13 14:46:59 +0000
committerChristian Schneider2012-02-13 14:46:59 +0000
commitca407bc3f8e3e6d5f042be787f96304687af097e (patch)
tree52b8dd84fd1037e92171917f5dbdb95f51e5b237 /it_xml.class
parent3207842eeab9de8c558d23506ecc38cbe1ad8035 (diff)
downloaditools-ca407bc3f8e3e6d5f042be787f96304687af097e.tar.gz
itools-ca407bc3f8e3e6d5f042be787f96304687af097e.tar.bz2
itools-ca407bc3f8e3e6d5f042be787f96304687af097e.zip
Replace preg_replace /e modifier with preg_replace_callback: Modified planned to be removed. ITools now requires PHP 5.3 or newer
Diffstat (limited to 'it_xml.class')
-rw-r--r--it_xml.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_xml.class b/it_xml.class
index 2401b7b..4e34c81 100644
--- a/it_xml.class
+++ b/it_xml.class
@@ -131,7 +131,7 @@ function _sanitize($xmldata, $isutf8 = null)
# If should be utf-8 and can't be decoded as such, fix it, even if mixed between both
if ($isutf8 && preg_match('/[^\x80-\xff][\x80-\xff][^\x80-\xff]/', $xmldata))
- $xmldata = preg_replace('/[\x80-\xff]{1,4}/e', "it_xml::_utf8_fix('\\0')", $xmldata);
+ $xmldata = preg_replace_callback('/[\x80-\xff]{1,4}/', function($m) { return it_xml::_utf8_fix($m[0]); }, $xmldata);
# If not utf-8, remove characters illegal for latin-1
if (!$isutf8 && preg_match('/[\x00-\x08\x0b-\x0c\x0e-\x1f\x80-\x9f]/', $xmldata))