Support » Plugin: Lazy Load Divi Section Backgrounds » Error with php8

  • Warning: Attempt to read property “post_content” on null in //public_html/wp-content/plugins/lazy-load-divi-section-backgrounds/lazy-load-divi-section-backgrounds.php on line 20

Viewing 1 replies (of 1 total)
  • Thread Starter forna91

    (@forna91)

    solved changing the main function

    	if( isset( $regex ) && isset( $post->post_content )) {
       		if ( preg_match( $regex, $post->post_content ) ) {
    			add_action( 'wp_print_styles', 'lazy_load_section_bg_add_header_css' );
    			add_action( 'wp_print_footer_scripts', 'lazy_load_section_bg_add_footer_js' );
    		}
    	}
Viewing 1 replies (of 1 total)
  • The topic ‘Error with php8’ is closed to new replies.