Un utente ha chiesto informazioni su & Growth

  • Backup
  • Jetpack - WP Security
  • Speed di Wordpress

    messaggio di avviso in bpp 7.2

  • Un utente ha chiesto 👇

    Ho ricevuto il seguente avviso con php 7.2:

    Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/mafw.club/wp-includes/post-template.php on line 284
    

    L’ho risolto modificando la riga 314 in jetpack / _inc / lib / class.media-summary.php da qui:
    $post_excerpt = apply_filters( 'get_the_excerpt', $post_excerpt );

    Per farlo:

                            if (!empty($post_excerpt))
                                $post_excerpt = apply_filters( 'get_the_excerpt', $post_excerpt );

    Questo è implementato da Jetpack_Media_Summary :: get_excerpt.
    Ecco il back track dove $ post_excerpt era vuoto:

    #0 Jetpack_Media_Summary::get_excerpt(, , 16, 256) called at [/var/www/html/mafw.club/wp-content/plugins/jetpack/_inc/lib/class.media-summary.php:57]
    #1 Jetpack_Media_Summary::get(3984) called at [/var/www/html/mafw.club/wp-content/plugins/jetpack/class.jetpack-twitter-cards.php:94]
    #2 Jetpack_Twitter_Cards::twitter_cards_tags(Array ([og:type] => website,[og:title] => Morris Area Freewheelers,[og:description] => ,[og:url] => http://localhost/mafw.club/,[og:site_name] => Morris Area Freewheelers,[og:image] => https://s0.wp.com/i/blank.jpg,[og:locale] => en_US,[twitter:text:title] => Welcome)) called at [/var/www/html/mafw.club/wp-includes/class-wp-hook.php:288]
    #3 WP_Hook->apply_filters(Array ([og:type] => website,[og:title] => Morris Area Freewheelers,[og:description] => ,[og:url] => http://localhost/mafw.club/,[og:site_name] => Morris Area Freewheelers,[og:image] => https://s0.wp.com/i/blank.jpg,[og:locale] => en_US), Array ([0] => Array ([og:type] => website,[og:title] => Morris Area Freewheelers,[og:description] => ,[og:url] => http://localhost/mafw.club/,[og:site_name] => Morris Area Freewheelers,[og:image] => https://s0.wp.com/i/blank.jpg,[og:locale] => en_US),[1] => Array ([image_width] => 200,[image_height] => 200))) called at [/var/www/html/mafw.club/wp-includes/plugin.php:203]
    #4 apply_filters(jetpack_open_graph_tags, Array ([og:type] => website,[og:title] => Morris Area Freewheelers,[og:description] => ,[og:url] => http://localhost/mafw.club/,[og:site_name] => Morris Area Freewheelers,[og:image] => https://s0.wp.com/i/blank.jpg,[og:locale] => en_US), Array ([image_width] => 200,[image_height] => 200)) called at [/var/www/html/mafw.club/wp-content/plugins/jetpack/functions.opengraph.php:216]
    #5 jetpack_og_tags() called at [/var/www/html/mafw.club/wp-includes/class-wp-hook.php:286]
    #6 WP_Hook->apply_filters(, Array ([0] => )) called at [/var/www/html/mafw.club/wp-includes/class-wp-hook.php:310]
    #7 WP_Hook->do_action(Array ([0] => )) called at [/var/www/html/mafw.club/wp-includes/plugin.php:453]
    #8 do_action(wp_head) called at [/var/www/html/mafw.club/wp-includes/general-template.php:2614]
    #9 wp_head() called at [/var/www/html/mafw.club/wp-content/themes/generatepress/header.php:18]
    

    Questo argomento è stato modificato 3 anni fa da.

    Supporto per plugin

    (@kokkieh)

    3 anni fa

    Ciao,

    Grazie per la segnalazione. Siamo a conoscenza di questo problema e ci stiamo lavorando qui:

    https://github.com/Automattic/jetpack/issues/8420

    Puoi iscriverti a quella domanda GH per ricevere aggiornamenti su qualsiasi progresso.

    Nel frattempo, dovresti essere in grado di prevenire questo errore disattivando i moduli Condivisione e Pubblicità, poiché utilizzano quel codice.

    Was this helpful?

    0 / 0

    Lascia un commento 0

    Your email address will not be published. Required fields are marked *