I've asked for the upgrade to PHP 5.3 with mbstring enabled to my hosting company, but until they do that, I've made a helper to fullfil the lack of two functions Flexi uses. I'm pretty sure it's not the best code ever, but at least it's a start to make backward compatibility where mbstring isn't enabled.
mbstring_helper.php source code:
Code:
<?php
if (!function_exists('mb_strlen')) {
function mb_strlen($string) {
return preg_match_all( '(.)su', $string, $matches );
}
}
if (!function_exists('mb_substr')){
function mb_substr($string, $start = 0, $length = NULL) {
$pattern = '^';
if ($start > 0)
$pattern .= '(?:.{'.$start.'})';
else
$pattern .= '(?:.*)';