joodb 1.5B3 (Joomla 1.5.22) caused an error message in strpos (helper.php) in some situations where the string contained non printable characters. The reason is in function wrapText. Modifying your function to the following version eliminates the bug
/**
* Shorten a text
*
* @access public
* @param String with text, Integer with maximum length
*/
function wrapText($text,$maxlen=120) {
$text = strip_tags($text);
if (strlen($text)>$maxlen) {
$len = strpos($text," ",$maxlen);
if ($len) $text = substr($text,0,$len).' …';
}
return $text;
}
Kind regards und beste Grüße and die Programmierer einer hilfreichen Komponente!
Ch Wolkersdorfer