Skip to content

Commit 1640125

Browse files
committed
Docs: Correct the WP_Block_Parser_Frame::leading_html_start type.
The property was documented as `int`, but the constructor declares `$leading_html_start` as an optional parameter defaulting to `null` and assigns it straight through, so the property holds `null` whenever no offset is supplied. This is unlike the neighboring `$prev_offset`, which is coalesced to a computed integer and therefore is accurately documented as `int`. The property is now documented as `int|null`, matching the constructor's own parameter documentation. Developed in WordPress#7881. Follow-up to r56048, r61504. Props marian1, mukesh27. Fixes #62561. git-svn-id: https://develop.svn.wordpress.org/trunk@63444 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a036d30 commit 1640125

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/class-wp-block-parser-frame.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class WP_Block_Parser_Frame {
5151
* Byte offset into document where leading HTML before token starts
5252
*
5353
* @since 5.0.0
54-
* @var int
54+
* @var int|null
5555
*/
5656
public $leading_html_start;
5757

0 commit comments

Comments
 (0)