Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#22945 closed defect (bug) (duplicate)

get_page_uri() produce PHP Warning on line 3588

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


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 11 years ago.
Casting as (array) resolves the issue

Download all attachments as: .zip

Change History (2)

11 years ago

Casting as (array) resolves the issue

#1 @ocean90
11 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.