functions.inc.php (Bugs)

by D-Grund Nyheder, Tuesday, November 02, 2010, 22:07 (4923 days ago) @ D-Grund Nyheder
edited by D-Grund Nyheder, Tuesday, November 02, 2010, 22:43

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

i will do this to use default if empty like the function is made in ($string,$encoding='utf-8')

I have done this on all functions with the $encoding in. and a much better solution.
and it works.

so @ solution was a panic solution and this seams to really work without errors and no suppressing the errors there are no errors at all. but so the missing $encoding.

i will be back.


Complete thread:

 RSS Feed of thread