|
From: <luc...@us...> - 2013-08-24 22:35:05
|
Revision: 11975
http://sourceforge.net/p/xoops/svn/11975
Author: luciorota
Date: 2013-08-24 22:35:00 +0000 (Sat, 24 Aug 2013)
Log Message:
-----------
preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in file /modules/wfdownloads/class/request.php
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php 2013-08-24 21:29:18 UTC (rev 11974)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php 2013-08-24 22:35:00 UTC (rev 11975)
@@ -932,9 +932,12 @@
}
$source = strtr($source, $ttr);
// convert decimal
- $source = preg_replace('/&#(\d+);/me', "chr(\\1)", $source); // decimal notation
+ //$source = preg_replace('/&#(\d+);/me', "chr(\\1)", $source); // decimal notation
+ $source = preg_replace_callback('/&#(\d+);/m', function($m) {return chr($m[1]);}, $source); // decimal notation
// convert hex
- $source = preg_replace('/&#x([a-f0-9]+);/mei', "chr(0x\\1)", $source); // hex notation
+ //$source = preg_replace('/&#x([a-f0-9]+);/mei', "chr(0x\\1)", $source); // hex notation
+ $source = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($m) {return chr(hexdec($m[1]));}, $source); // hex notation
+
return $source;
}
}
\ No newline at end of file
|