functions.inc.php (Bugs)

by D-Grund Nyheder ⌂ @, Danmark, Thursday, October 28, 2010, 10:18 (4921 days ago)
edited by D-Grund Nyheder, Thursday, October 28, 2010, 10:24

Fixed a bug in "/forum/includes/functions.inc.php" on line 2147 and 2186

Code snippets from: "/forum/includes/functions.inc.php" line 2143 to 2153 on error line 2147
Original code from mylittleforum

function my_strlen($string, $encoding='utf-8')
 {
  if(function_exists('mb_strlen'))
   {
    return mb_strlen($string, $encoding);
   }
  else
   {
    return strlen($string);
   }
 }

change to

function my_strlen($string, $encoding='utf-8')
 {
  if(function_exists('mb_strlen'))
   {
    return @mb_strlen($string, $encoding);
   }
  else
   {
    return strlen($string);
   }
 }


End of code snippets from: "/forum/includes/functions.inc.php" line 2143 to 2153 on error line 2147

Code snippets from: "/forum/includes/functions.inc.php" line 2182 to 2192 on error line 2186
Original code from mylittleforum

function my_substr($string, $start, $length, $encoding='utf-8')
 {
  if(function_exists('mb_substr'))
   {
    return mb_substr($string, $start, $length, $encoding);
   }
  else
   {
    return substr($string, $start, $length);
   }
 }

change to

function my_substr($string, $start, $length, $encoding='utf-8')
 {
  if(function_exists('mb_substr'))
   {
    return @mb_substr($string, $start, $length, $encoding);
   }
  else
   {
    return substr($string, $start, $length);
   }
 }


Ends of code snippets from: "/forum/includes/functions.inc.php" line 2182 to 2192 on error line 2186

if not a warning(s) is displayet on top of the forum "Not good"

Hope it helps [image]


Complete thread:

 RSS Feed of thread