DynamicActiveRecord.php
public static function encodeForMaria($value)
    {
        return is_string($value)
        && (!mb_check_encoding($value, 'UTF-8') || strpos($value, self::DATA_URI_PREFIX) === 0)
            ? self::DATA_URI_PREFIX . base64_encode($value)
            : $value;
    }
public static function encodeForMaria($value)
    {
        return is_string($value)
        && (!mb_check_encoding($value, 'UTF-8') || strpos($value, self::DATA_URI_PREFIX) === 0)
            ? self::DATA_URI_PREFIX . base64_encode($value)
            : $value;
    }
public static function encodeForMaria ( $ value ) { return is_string ( $ value ) && ( ! mb_check_encoding ( $ value , 'UTF-8' ) || strpos ( $ value , self :: DATA_URI_PREFIX ) === 0 ) ? self :: DATA_URI_PREFIX . base64_encode ( $ value ) : $ value ; }
Encode as data URIs strings that JSON cannot express.

@param mixed $value a value to encode

@return string the encoded data URI
Encode as data URIs strings that JSON cannot express .