2008-11-27, 05:48 PM
Hi,
after I updated 1.4.3 to 1.4.4 all postings were empty.
By adding debug messages, I found that the message parser returns an empty string for me now after parsing the message. There are two culprits.
One is my_wordwrap(), it works fine with values > 0, but when I set wordwrap to 0 it retuns an empty message, not sure why.
The other is the smiley parser, in class_parser.php, this line makes message an empty string:
As for the reason, I have no idea yet.
If no one else is experiencing the issues, it may be a compatibility problem. My server is still running PHP 4.3.10.
I can reproduce the empty posting issue with wordwrap = 0 on a PHP5 server. I guess that's partly my fault, as wordwrapper was changed due to a bugreport of mine, and I guess I only tested it with wordwrap values > 0.
The smiley parser works fine on PHP5 but for some reason that one preg_replace call causes issues on PHP4.
my_wordwrap returns $new_message which only gets set with wordwrap > 0. Easy to fix.
The preg_replace is more complicated, I don't know enough about PHP / preg_replace to know what is different that makes it work in PHP5 but not in PHP4.
after I updated 1.4.3 to 1.4.4 all postings were empty.
By adding debug messages, I found that the message parser returns an empty string for me now after parsing the message. There are two culprits.
One is my_wordwrap(), it works fine with values > 0, but when I set wordwrap to 0 it retuns an empty message, not sure why.
The other is the smiley parser, in class_parser.php, this line makes message an empty string:
$message = preg_replace("#(?<=[^\"])".$find."(?=.\W|\"|\W.|\W$)#si", $replace, $message, $remaining);
As for the reason, I have no idea yet.
If no one else is experiencing the issues, it may be a compatibility problem. My server is still running PHP 4.3.10.
I can reproduce the empty posting issue with wordwrap = 0 on a PHP5 server. I guess that's partly my fault, as wordwrapper was changed due to a bugreport of mine, and I guess I only tested it with wordwrap values > 0.
The smiley parser works fine on PHP5 but for some reason that one preg_replace call causes issues on PHP4.
my_wordwrap returns $new_message which only gets set with wordwrap > 0. Easy to fix.
The preg_replace is more complicated, I don't know enough about PHP / preg_replace to know what is different that makes it work in PHP5 but not in PHP4.