|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-18 12:02 UTC] felipe@php.net
[2007-12-26 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 01:00:01 2025 UTC |
Description: ------------ If I use phpBB2 forum tags like [b][/b] or [u][/u] in a message and the text between the tags is longer then about 148 characters, the whole message becomes empty. This problem occurs in php version 5.2.x (x=0,4,5), but not in version 4.4.7 or 5.1.6. When I upgraded my server to 5.2.5, I discovered this problem. Of course, I first searched for a solution on the phpBB forum, but I found nothing related to this. Am I the first using an older phpBB forum with a new php version, and long texts between tags? Reproduce code: --------------- type message in a phpBB2.0.x forum: [u]012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789[/u] includes/bbcode.php, function bbencode_second_pass($text, $uid): $text = str_replace("[u:$uid]", $bbcode_tpl['u_open'], $text); $text = str_replace("[/u:$uid]", $bbcode_tpl['u_close'], $text); the first str_replace goes well, the second one makes $text empty. Expected result: ---------------- both string replacements are done well and the message is shown. Actual result: -------------- the second string replacement makes $text empty and no message is shown.