Ticket #11661 (closed defect (bug): fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: Denis-de-Bernardy Owned by: ryan
Priority: normal Milestone: 2.9.1
Component: Rewrite Rules Version: 2.9
Severity: critical Keywords: has-patch blocker
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

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

Change History

  • Keywords has-patch blocker added

patches attached for trunk and 2.9 branch.

comment:2   ryan2 years ago

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

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

comment:3   ryan2 years ago

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

comment:4   ryan2 years ago

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

comment:5   ryan2 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.