update for PHP 7.2 compatibility
This commit is contained in:
parent
4500fe78e1
commit
c156c77002
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,4 +265,4 @@ class Text {
|
||||||
|
|
||||||
return $truncate;
|
return $truncate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue