Opened 5 months ago

Closed 5 months ago

#22945 closed defect (bug) (duplicate)

get_page_uri() produce PHP Warning on line 3588

Reported by: lightningspirit Owned by:
Priority: normal Milestone:
Component: General Version: 3.5
Severity: normal Keywords: has-patch
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 months ago.
Casting as (array) resolves the issue

Download all attachments as: .zip

Change History (2)

Casting as (array) resolves the issue

  • 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.