miniBB Support Forums | 17 years on The Web
miniBB ® 

miniBB

®
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Bugs miniBB Support Forums / Bugs /   
 

Error: empty, but really not empty message

 
Author Glupstwo
Partaker
#1 | Posted: 5 Nov 2019 11:58 
Some users when want post the message got error that message is short or empty. In true message is not empty or short. Error link to this row on file bb_func_txt.php : foreach($str as $i=>$char){

I found solution and install badwords pluggin. But it not helps.
Please help me to find the problem.

Author Paul
Lead Developer
#2 | Posted: 5 Nov 2019 12:06 | Edited by: Paul 
We need to know a certain exact message to repeat the broblem and then investigate it. If someone from your users gets this problem, please let him/her to send you an exact text which was tried to post, and the error text on the screen they see. Then re-send it to me.

The most important is to repeat the problem. Only then we could investigate and fix it. Pointing to a line of code doesn't help.

Author Glupstwo
Partaker
#3 | Posted: 5 Nov 2019 12:28 
Messages on lithuanian and I don't know ... Users ask me by phone.
I as admin test to post many messages (short, long, in lithuanian letters, only on latin letters...), but got some problem. I found on forum old post (2012, http://www.minibb.com/forums/specific-20/cannot-post-error-message-message-too-short-empty-5896.html ) about french encoding, but then was a php version problem.

Author Glupstwo
Partaker
#4 | Posted: 5 Nov 2019 16:23 
Hi, we solved! Problem appear for lithuanian letters in message and php version on server. When we downground from 7.3 to 7.1, we not got anymore the errors, and our messages was posted. Maybe this problems start from php 7.2. Thanks to Michal from setupad_com team!

Author Paul
Lead Developer
#5 | Posted: 5 Nov 2019 18:19 
Ok... it really could be something PHP 7.3 specific and it is definitely related to UTF-8 chars. I suppose, the error may appear at the stage when miniBB tries to split a string. At some of my older development stages I've met and worked out this issue, but now it seems to come back.

As it's announced PHP 7.3 release, there were introduced improvements for PCRE extension, MB-string functions and also there are several deprecated features for string-parsing functions. All of these updated could be the reason of this issue.

Alas, I couldn't test UTF-8 texts on PHP 7.3 now, but I will try to do it in the nearest future.

You could try one thing on your own, if you have enough experience... In bb_func_txt.php, miniBB uses this code to split the string by chars, this also includes UTF8-chars:

$str=preg_split($splitExpression, $fragment, null, PREG_SPLIT_NO_EMPTY);

$splitExpression equals to '//u' by default, but this could be re-defined in setup_options.php. I'm not sure what has to be work-out for PHP 7.3, but probably the error comes from this place. When the script tries to split a string, for some reason it couldn't do it and gets an empty value. That's why in result an empty message appears.

Bugs miniBB Support Forums / Bugs /
 Error: empty, but really not empty message
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


 ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.

 ⇑