Skip to content

Commit db872ff

Browse files
committed
Ensure we get bookmark_name on tokens
1 parent 51db0ac commit db872ff

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/wp-includes/html-api/class-wp-html-token.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class WP_HTML_Token {
3131
*
3232
* @var string
3333
*/
34-
public $bookmark_name = null;
34+
public $bookmark_name;
3535

3636
/**
3737
* Name of node; lowercase names such as "marker" are not HTML elements.
@@ -90,13 +90,13 @@ class WP_HTML_Token {
9090
*
9191
* @since 6.4.0
9292
*
93-
* @param string|null $bookmark_name Name of bookmark corresponding to location in HTML where token is found,
93+
* @param string $bookmark_name Name of bookmark corresponding to location in HTML where token is found,
9494
* or `null` for markers and nodes without a bookmark.
9595
* @param string $node_name Name of node token represents; if uppercase, an HTML element; if lowercase, a special value like "marker".
9696
* @param bool $has_self_closing_flag Whether the source token contains the self-closing flag, regardless of whether it's valid.
9797
* @param callable|null $on_destroy Optional. Function to call when destroying token, useful for releasing the bookmark.
9898
*/
99-
public function __construct( ?string $bookmark_name, string $node_name, bool $has_self_closing_flag, ?callable $on_destroy = null ) {
99+
public function __construct( string $bookmark_name, string $node_name, bool $has_self_closing_flag, ?callable $on_destroy = null ) {
100100
$this->bookmark_name = $bookmark_name;
101101
$this->namespace = 'html';
102102
$this->node_name = $node_name;

0 commit comments

Comments
 (0)