Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-block-parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public function freeform( $inner_html ) {
* @param null|int $length How many bytes of document text to output.
*/
public function add_freeform( $length = null ) {
$length = $length ? $length : strlen( $this->document ) - $this->offset;
$length = $length ?? strlen( $this->document ) - $this->offset;

if ( 0 === $length ) {
return;
Expand Down Expand Up @@ -356,7 +356,7 @@ public function add_inner_block( WP_Block_Parser_Block $block, $token_start, $to
}

$parent->block->innerContent[] = null;
$parent->prev_offset = $last_offset ? $last_offset : $token_start + $token_length;
$parent->prev_offset = $last_offset ?? $token_start + $token_length;
}

/**
Expand Down
Loading