MyBB Community Forums

Full Version: [F] [Fix] Empty data after parse_message()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
The problem is inside parse_smilies(). (inc/class_parser.php)
Line 415

Replace:
$message = preg_replace("#(?<=[^\"])".$find."(?=.\W|\"|\W.|\W$)#si", $replace, $message, $remaining);

With:
$message = preg_replace("#(?<=[^&;\"])".$find."(?=.\W|\"|\W.|\W$)#si", $replace, $message, $remaining); 

Notice the &;\ instead of only \"

PHP 4
I'm not sure how &; fixes it. In fact that piece of code was specifically removed to fix smilies from parsing where you had &) turning into &ampWink
Well actually it fixes it lol. Posts message show now and the shoutbox messages on my forum also show.
Are you sure it's not a conflict with your shoutbox?
No, I also know a user from my forum who was having the same problem and this fixed it.

I am talking about the Posts AND private messages now. But the shoutbox also got fixed
I applied a better fix. The changed file package and download should be updated.

And just so people know, the patch for the "&ampWink bug" only works for PHP 5 or above now. You shouldn't even be on PHP 4 anymore anyway.
Which file was updated? Can you confirm it was (inc/class_parser.php)?
Yes, inc/class_parser.php - The fix is only needed if your running PHP 4 though.
@Ryan, I am on PHP4 because my host detects if the user is using PHP 5 if the extension of the php file is php5 :/ and MyBB's paths are always set to .php so I can't use PHP5
(2008-11-27, 07:23 PM)Pirata Nervo Wrote: [ -> ]@Ryan, I am on PHP4 because my host detects if the user is using PHP 5 if the extension of the php file is php5 :/ and MyBB's paths are always set to .php so I can't use PHP5

I don't think I've ever seen a bulletin board use the .php5 extensions just to work around hosts incompetency. I suggest you would ask your host to upgrade you as MyBB 1.6 will not support PHP 4 any longer.
Pages: 1 2