functions.inc.php (Bugs)
Hello
Fixed a bug in "/forum/includes/functions.inc.php"
Code snippets from: "/forum/includes/functions.inc.php" line 2143 to 2153 on error line 2147
change to
function my_strlen($string, $encoding='utf-8') { if(function_exists('mb_strlen')) { return @mb_strlen($string, $encoding); } else { return strlen($string); } }
if not a warning(s) is displayet on top of the forum "Not good"
The function gets a string and the encoding. In wich using scenario there could popup a warning? Any examples?
I get the warning when I will see what is posted in the forum (Warning: mb_substr () [function.mb-substr]: Unknown encoding "" in /****/********/ public_html / forum / includes / functions.inc.php on line 2186)When I want to see user settings (Warning: mb_substr () [function.mb-substr]: Unknown encoding "" in /****/********/ public_html / forum / includes / functions.inc. php on line 2186
That seems to be a bug. The function mb_substr
is called inside my_substr
where an encoding is declared ($encoding='utf-8'
). It can't be empty, except you give an empty encoding declaration to my_substr
.
$substring = my_substr($string, '');
There must be anything else ...
But I put an @ in front as shown in previous postings
That's not a bug fix. It covers the bug instead to correct it.
It works for me.
not really (see above)
Tschö, Auge
--
Trenne niemals Müll, denn er hat nur eine Silbe!