Merge pull request #571 from xm74/patch-1
text.class.php update for PHP 7.2 compatibility
This commit is contained in:
commit
078fdb344c
|
@ -234,7 +234,9 @@ class Text {
|
||||||
public static function pre2htmlentities($string)
|
public static function pre2htmlentities($string)
|
||||||
{
|
{
|
||||||
return preg_replace_callback('/<pre.*?><code(.*?)>(.*?)<\/code><\/pre>/imsu',
|
return preg_replace_callback('/<pre.*?><code(.*?)>(.*?)<\/code><\/pre>/imsu',
|
||||||
create_function('$input', 'return "<pre><code $input[1]>".htmlentities($input[2])."</code></pre>";'),
|
function ($input) {
|
||||||
|
return "<pre><code $input[1]>".htmlentities($input[2])."</code></pre>";
|
||||||
|
},
|
||||||
$string);
|
$string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue