WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#22945 closed defect (bug) (duplicate)

get_page_uri() produce PHP Warning on line 3588

Reported by: lightningspirit Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: General Keywords: has-patch
Focuses: Cc:

Description

When a page has no ancestors, foreach produces:

Warning: Invalid argument supplied for foreach() in [...]/wp-includes/post.php on line 3588

Attachments (1)

22945.diff (380 bytes) - added by lightningspirit 5 years ago.
Casting as (array) resolves the issue

Download all attachments as: .zip

Change History (2)

@lightningspirit
5 years ago

Casting as (array) resolves the issue

#1 @ocean90
5 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Severity changed from major to normal
  • Status changed from new to closed

Duplicate of #22883.

Note: See TracTickets for help on using tickets.