Opened 2 months ago

Closed 2 months ago

#23744 closed defect (bug) (fixed)

PHP notice on a custom post type archive with default permalinks enabled

Reported by: ericlewis Owned by: SergeyBiryukov
Priority: normal Milestone: 3.6
Component: Warnings/Notices Version: 3.1
Severity: normal Keywords: has-patch
Cc:

Description

Notice: Undefined index: feeds in /Users/ericlewis/Sites/wordpress-trunk/wp-includes/link-template.php on line 871

Looks like something to do with the way the post type object is set up by default with default permalinks enabled.

Attachments (2)

23744.patch (589 bytes) - added by ericlewis 2 months ago.
Change boolean check to empty()
23744.2.patch (721 bytes) - added by SergeyBiryukov 2 months ago.

Download all attachments as: .zip

Change History (5)

Change boolean check to empty()

  • Component changed from Feeds to Warnings/Notices
  • Milestone changed from Awaiting Review to 3.6
  • Version changed from trunk to 3.1

23744.2.patch reorders the conditions in the same way as in get_post_type_archive_link():
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/link-template.php#L840

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

In 23660:

Avoid an undefined index notice in get_post_type_archive_feed_link(). props ericlewis. fixes #23744.

Note: See TracTickets for help on using tickets.