-
Bug
-
Resolution: Fixed
-
Blocker
-
3.0.x
-
None
-
PHP Environment: 5.3.0a1
Database:
Yeah, this bug exists in phpBB 3.x for a long time, but actually it appears only when running under PHP 5.3.x and newer one.
includes/functions_content.php (get_context() function, line 240)
// first replace all whitespaces with single spaces $text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '), $text);
|
should be:
// first replace all whitespaces with single spaces $text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '), utf8_strlen($text));
|
AFAIK PHP 5.3 has more restrictive functions parameters mechanism, that's why previous PHP versions have never reported about the fact, that a string instead of a long is passed to the function. This issue also makes the text of a post not display in search results, when running under PHP 5.3.