Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#47604 closed defect (bug) (fixed)

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

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

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 7 years ago.

Download all attachments as: .zip

Change History (10)

#1 @aprea
7 years ago

  • Keywords has-patch added

#2 @mukesh27
7 years ago

  • Version trunk5.0

#3 @azaozz
7 years ago

  • Milestone Awaiting Review5.2.3

This should probably be fixed in the next minor.

#4 @azaozz
7 years ago

  • Owner set to azaozz
  • Resolutionfixed
  • Status newclosed

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
7 years ago

  • Resolution fixed
  • Status closedreopened

Reopen for 5.2.3 consideration.

#6 @azaozz
7 years ago

  • Keywords fixed-major added

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


7 years ago

#8 @pierlo
7 years ago

I can confirm [45564] resolves this issue.

#9 @SergeyBiryukov
7 years ago

  • Resolutionfixed
  • Status reopenedclosed

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.