pyrocms/pyrocms — Issue #1083: utf8 validation rule still throwing errors if mbstring was not enabled
Author: lambentman
Created: 2012-01-19 02:20:23+00:00
State: open

Hi,

I think commit 2f77433bedafd18c2f735aa507862c6de098eb1f may contain an error in system/pyrocms/libraries/MY_Form_validation.php. The check

```
// If they don't have mbstring enabled (suckers) then we'll have to do with what we got
if ( ! function_exists($str))
{
return $str;
}
```
checks for the existence of arbitrary functions, dependent upon the string being validated. Perhaps this should be

```
// If they don't have mbstring enabled (suckers) then we'll have to do with what we got
if ( ! function_exists('mb_convert_encoding'))
{
return $str;
}
```
??