• Resolved Sourav Pan

    (@microbiologynote)


    I updated my php to 8.1 then it showing this error msg’
    Warning: Uninitialized string offset 0 in /home/u554146333/domains/microbiologynote.com/public_html/wp-content/plugins/seo-by-rank-math/vendor/mythemeshop/wordpress-helpers/src/helpers/class-str.php on line 235

    How to solve this

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Sourav Pan

    (@microbiologynote)

    Here is the full code
    @param string $string String to convert.
    */
    public static function mb_ucwords( $string ) {
    if ( ! function_exists( ‘mb_convert_case’ ) || ! function_exists( ‘mb_detect_encoding’ ) || mb_detect_encoding( $string ) !== ‘UTF-8’ ) {
    return ucwords( $string );
    }

    $words = preg_split( ‘/([\s]+)/u’, $string, -1, PREG_SPLIT_DELIM_CAPTURE );
    $ucwords = ”;
    foreach ( $words as $word ) {
    $ucwords .= preg_match( ‘/[\p{L}]/u’, $word[0] ) ? mb_strtoupper( $word[0], ‘UTF-8’ ) . mb_substr( $word, 1, mb_strlen( $word ), ‘UTF-8’ ) : $word;
    }

    return $ucwords;
    }
    }

    and here is the 235 lin

    $ucwords .= preg_match( ‘/[\p{L}]/u’, $word[0] ) ? mb_strtoupper( $word[0], ‘UTF-8’ ) . mb_substr( $word, 1, mb_strlen( $word ), ‘UTF-8’ ) : $word;

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @microbiologynote,

    Thank you for contacting the support.

    We have already replied to the topic you created in our forum. Please check the reply there and add your response so our support team can assist you further:
    https://support.rankmath.com/ticket/showing-this-warning-when-i-tried-to-updated-my-php-version-to-8-1/?view=all#post-512708

    Looking forward to helping you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Showing Warning: Uninitialized string offset 0 in’ is closed to new replies.