WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/26/2015 04:04:55 AM (5 years ago)
Author:
dd32
Message:

Nav Menus: Avoid a PHP Notice when a menu contains a now unregistered post type archive.

Props kucrut.
Fixes #34449 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-walker-nav-menu-edit.php

    r36016 r36095  
    8181        } elseif ( 'post_type_archive' == $item->type ) {
    8282            $original_object = get_post_type_object( $item->object );
    83             $original_title = $original_object->labels->archives;
     83            if ( $original_object ) {
     84                $original_title = $original_object->labels->archives;
     85            }
    8486        }
    8587
Note: See TracChangeset for help on using the changeset viewer.