Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #162932

    Hi Kriesi Team!

    My website is almost completed and I couldn’t be happier with this brilliant theme.
    I just want to adjust one thing in my menu but up until recently I wasn’t able to because I was receiving the following error.

    ‘Catchable fatal error: Object of class WP_Error could not be converted to string in /home2/krystina/public_html/wp-includes/formatting.php on line 511’

    I have found line 511 and it starts off with…

    function wp_check_invalid_utf8( $string, $strip = false ) {
    $string = (string) $string; <—–THIS IS LINE 511

    if ( 0 === strlen( $string ) ) {
    return ”;
    }

    // Store the site charset as a static to avoid multiple calls to get_option()
    static $is_utf8;
    if ( !isset( $is_utf8 ) ) {
    $is_utf8 = in_array( get_option( ‘blog_charset’ ), array( ‘utf8’, ‘utf-8’, ‘UTF8’, ‘UTF-8’ ) );
    }
    if ( !$is_utf8 ) {
    return $string;
    }

    // Check for support for utf8 in the installed PCRE library once and store the result in a static
    static $utf8_pcre;
    if ( !isset( $utf8_pcre ) ) {
    $utf8_pcre = @preg_match( ‘/^./u’, ‘a’ );
    }
    // We can’t demand utf8 in the PCRE installation, so just return the string in those cases
    if ( !$utf8_pcre ) {
    return $string;
    }

    // preg_match fails when it encounters invalid UTF8 in $string
    if ( 1 === @preg_match( ‘/^./us’, $string ) ) {
    return $string;
    }

    // Attempt to strip the bad chars if requested (not recommended)
    if ( $strip && function_exists( ‘iconv’ ) ) {
    return iconv( ‘utf-8’, ‘utf-8’, $string );
    }

    return ”;
    }

    Does the Kriesi Team have any idea on what I would need to change in this code? Thank you! :)

    • This topic was modified 11 years, 3 months ago by tinagianna.
    #162948

    Oh and I thought I might add that I have tried

    – Deactivating all Pluggins
    – Searching the error in Google
    – Searching for the error on Kriesi (I found a post, but it didn’t have an answer)

    Ive been trying, and no luck just yet..

    #163251

    Hi!

    I think this problem has to do with cyrillic characters, can we get an screenshot of the backend view of the menu?

    Best regards,
    Josue

    #163330

    Hi Josue,

    Thanks for the response! I took 2 screen shots of the menu view through WordPress and through the WordPress installation directory (Formatting.php). I hope this is what you meant :)

    http://s7.postimg.org/w600h57u3/screenshot1.jpg

    http://s23.postimg.org/emg0iwowr/screenshot2.jpg

    #163332

    I briefly looked through the scripting and didn’t see any cyrillic characters. Ill double check again and let you know if I do :)

    #163334

    Hello!

    Well, i thought wrong, have you tried switching back to the default theme?

    Regards,
    Josue

    #163343

    You are brilliant.. That worked! Thanks a million Josue and have a fabulous day :)))

    #163345

    Glad we could help :)

    Regards,
    
Josue

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘'Catchable fatal error' appears when I try to access the Menus tab in WordPress’ is closed to new replies.