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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -263,4 +265,4 @@ class Text {
|
|||
|
||||
return $truncate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue