WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 7 months ago

#47604 closed defect (bug) (fixed)

Undefined variable: locked in wp-admin/edit-form-blocks.php

Reported by: aprea Owned by: azaozz
Milestone: 5.2.3 Priority: normal
Severity: minor Version: 5.0
Component: Editor Keywords: has-patch fixed-major
Focuses: administration Cc:

Description

A $locked variable is defined on line 231 in wp-admin/edit-form-blocks.php within an if statement and is referenced on line 235 and 244.

This results in a PHP notice being raised if the show_post_locked_dialog filter returns a falsy value. This is because the $locked variable is never defined unless that if condition is satisfied.

Attachments (1)

#47604_define_locked_in_edit_form_blocks.diff (532 bytes) - added by aprea 8 months ago.

Download all attachments as: .zip

Change History (10)

#1 @aprea
8 months ago

  • Keywords has-patch added

#2 @mukesh27
8 months ago

  • Version changed from trunk to 5.0

#3 @azaozz
8 months ago

  • Milestone changed from Awaiting Review to 5.2.3

This should probably be fixed in the next minor.

#4 @azaozz
8 months ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 45564:

Editor: Fix undefined $locked var in edit-form-blocks.php when the show_post_locked_dialog filter is used to disable displaying of the dialog.

Props aprea.
Fixes #47604.

#5 @azaozz
8 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 5.2.3 consideration.

#6 @azaozz
8 months ago

  • Keywords fixed-major added

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


7 months ago

#8 @pierlo
7 months ago

I can confirm [45564] resolves this issue.

#9 @SergeyBiryukov
7 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 45831:

Editor: Fix undefined $locked var in edit-form-blocks.php when the show_post_locked_dialog filter is used to disable displaying of the dialog.

Props aprea.
Merges [45564] to the 5.2 branch.
Fixes #47604.

Note: See TracTickets for help on using tickets.