Skip to content

PHP Notice "Undefined variable: screen" in meta-boxes.php:1365 #11469

@dmccan

Description

@dmccan

When going to create a new Wiki post I receive the notice:

NOTICE: E:\laragon\www\betatest\wp-admin\includes\meta-boxes.php:1365 - Undefined variable: screen
include('E:\laragon\www\betatest\wp-admin\edit-form-advanced.php'), register_and_do_post_meta_boxes

To Reproduce
Steps to reproduce the behavior:

  • Install the latest version 5 beta

  • Install and activate the plugin Yada Wiki from the WP directory

  • With debug set to true, go to the Admin menu "Wiki Pages -> Add New" and you should see the warning notice.

  • In the file \wp-content\plugins\yada-wiki\includes\register-wiki-cpt.php change line 40 from this:

'supports'  => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'publicize', 'wpcom-markdown' ),

To this (adding support for custom fields) to have the notice go away:

'supports'   => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'publicize', 'wpcom-markdown', 'custom-fields' ),

Expected behavior
There is no warning notice when using WP 4.9.8. Expect the same with WP 5

Additional context

  • Using the default WP theme.
  • The only other plugins activated are WordPress Beta Tester and Debug Bar

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] WP Core TicketRequires an upstream change from WordPress. Core Trac ticket should be linked.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions