0

usando um plugin do wordpress o yoast acaba dando esse erro em alguns posts, um post que está dando erro é o:

https://www.escolaedti.com.br/indicadores-inadimplencia/amp/

nele podemos ver a mensagem:

"Notice: Uninitialized string offset: 0 in /home/escolaedti/public_html/wp-content/plugins/wordpress-seo/frontend/class-twitter.php on line 495"

Copiei o trecho no qual fala onde está o erro.

protected function image_output( $img, $tag = false ) {
        if ( $tag ) {
            _deprecated_argument( __METHOD__, 'WPSEO 2.4' );
        }
        /**
         * Filter: 'wpseo_twitter_image' - Allow changing the Twitter Card image
         *
         * @api string $img Image URL string
         */
        $img = apply_filters( 'wpseo_twitter_image', $img );
        if ( WPSEO_Utils::is_url_relative( $img ) === true && $img[0] === '/' ) {
            $parsed_url = wp_parse_url( home_url() );
            $img        = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $img;
        }
        $escaped_img = esc_url( $img );
        if ( in_array( $escaped_img, $this->shown_images, true ) ) {
            return false;
        }
        if ( is_string( $escaped_img ) && $escaped_img !== '' ) {
            $this->output_metatag( 'image', $escaped_img, true );
            array_push( $this->shown_images, $escaped_img );
            return true;
        }
        return false;
    }

linha 495:

if ( WPSEO_Utils::is_url_relative( $img ) === true && $img[0] === '/' ) {

Percebi esse erro depois que começamos a mudar de http para https.

3
  • como posso arrumar esse erro? 24/05/2018 às 15:27
  • Você pode editar sua pergunta se esquecer de algo, não precisa colocar como comentário. 24/05/2018 às 15:42
  • obrigado pelo comentário, mas não entendo como isso poderia me ajudar a resolver o meu problema, você saberia responder a pergunta? 25/05/2018 às 13:37

0

Você deve fazer log-in para responder a esta pergunta.

Pesquise outras perguntas com a tag .