WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11661 closed defect (bug) (fixed)

warning on line 790 of wp-includes/rewrite.php

Reported by: Denis-de-Bernardy Owned by: ryan
Milestone: 2.9.1 Priority: normal
Severity: critical Version: 2.9
Component: Rewrite Rules Keywords: has-patch blocker
Focuses: Cc:

Description

on sites with verbose rules and no static pages, the rewrite rule generator complains that it cannot array_reverse a non-array.

the culprit is get_page_hierarchy():

http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L2401

it should return an empty array instead of null.

Attachments (2)

11661.diff (352 bytes) - added by Denis-de-Bernardy 4 years ago.
11661-wp.2.9.diff (440 bytes) - added by Denis-de-Bernardy 4 years ago.

Download all attachments as: .zip

Change History (7)

Denis-de-Bernardy4 years ago

comment:1 Denis-de-Bernardy4 years ago

  • Keywords has-patch blocker added

patches attached for trunk and 2.9 branch.

comment:2 ryan4 years ago

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

(In [12571]) Return empty array instead of null. Props Denis-de-Bernardy. fixes #11661 for trunk

comment:3 ryan4 years ago

(In [12572]) Return empty array instead of null. Props Denis-de-Bernardy. fixes #11661 for 2.9

comment:4 ryan4 years ago

Oops, looks like this is the same as #11578, which already had a trunk commit.

comment:5 ryan4 years ago

The other patch makes a more conservative patch higher up the stack. I'd normally prefer that, but inadvertent API changes suck and if you don't fix them quickly they build momentum.

Note: See TracTickets for help on using tickets.