XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 1, 2011, 11:51:31 PM (14 years ago)
Author:
toemon
Message:

When mb_strlen or mb_substr doesn't exist, the bug of which it makes an error by get_xpress_excerpt_contents() is fixes. Fixed#391

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r680 r688  
    599599        $text = str_replace(']]>', ']]>', $text); 
    600600        $text = strip_tags($text); 
    601         $is_almost_ascii = ($xpress_config->ascii_judged_rate < round(@(mb_strlen($text, $blog_encoding) / strlen($text)) * 100)) ? true : false; 
     601        if (function_exists('mb_strlen') && function_exists('mb_substr')){ 
     602                $is_almost_ascii = ($xpress_config->ascii_judged_rate < round(@(mb_strlen($text, $blog_encoding) / strlen($text)) * 100)) ? true : false; 
     603        } else { 
     604                $is_almost_ascii = true; 
     605        } 
    602606        if($is_almost_ascii) { 
    603607                $words = explode(' ', $text, $excerpt_length_word + 1); 
Note: See TracChangeset for help on using the changeset viewer.