Forum Replies Created

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

    (@jokimazi)

    $post = get_post();
        	$added_styles = array();
        	$added_scripts = array();
    		if ( has_blocks( isset($post->post_content) ) ) {
    		    $blocks = parse_blocks( $post->post_content );
    
    		    self::traverse_block_styles( $blocks, $added_styles, $added_scripts );
    		}

    Just added isset() on line 104, fixes the error.

    $post = get_post();
        	$added_styles = array();
        	$added_scripts = array();
    		if ( has_blocks( $post->post_content ) ) {
    		    $blocks = parse_blocks( $post->post_content );
    
    		    self::traverse_block_styles( $blocks, $added_styles, $added_scripts );
    		}
Viewing 1 replies (of 1 total)