Make WordPress Core

Opened 16 years ago

Closed 15 years ago

Last modified 5 weeks ago

#6977 closed defect (bug) (fixed)

Undefined indexes for $redirect and $original in redirect_canonical

Reported by: minddog's profile minddog Owned by: markjaquith's profile markjaquith
Milestone: Priority: normal
Severity: normal Version:
Component: Canonical Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

To reproduce do a fresh install of wordpress and turn on debug mode. Visit the homepage and you'll see the notices.

Notice: Undefined index: port in <removed>/wp-includes/canonical.php on line 181
Notice: Undefined index: query in <removed>/wp-includes/canonical.php on line 181
Notice: Undefined index: port in <removed>/wp-includes/canonical.php on line 181
Notice: Undefined index: query in <removed>/wp-includes/canonical.php on line 181

To fix this issue, I think we can ignore any extraneous initialization code and suppress the notices with @, as the operation array() !== array() is not affected undefined indexes internally.

Please see my patch for fixing this issue, thanks.

Attachments (1)

6977_fix.patch (848 bytes) - added by minddog 16 years ago.

Download all attachments as: .zip

Change History (9)

@minddog
16 years ago

#1 @Denis-de-Bernardy
15 years ago

  • Component changed from General to Canonical
  • Owner changed from anonymous to markjaquith

#2 @filosofo
15 years ago

  • Milestone 2.9 deleted
  • Resolution set to fixed
  • Status changed from new to closed
  • Version 2.5.1 deleted

Already been fixed.

This ticket was mentioned in PR #7117 on WordPress/wordpress-develop by @jonsurrell.


6 weeks ago
#3

  • Keywords has-patch has-unit-tests added

Trac ticket: Core-61646

Previously, the html5lib tests have only run in the fragment parser mode, but in #6977 a full parser was introduced to the HTML API. In this patch, the html5lib tests are running in the full parser mode where applicable.

- Tests: 609, Assertions: 405, Skipped: 204.
+ Tests: 1486, Assertions: 716, Skipped: 770.

@dmsnell commented on PR #7117:


6 weeks ago
#4

@sirreal I've added active format reconstruction to the PLAINTEXT element, even though it's missing from the spec, but all the major parsers clearly perform this. I've submitted a PR to the HTML spec to add the rule.

https://github.com/whatwg/html/pull/10540

@dmsnell commented on PR #7117:


5 weeks ago
#5

Leaving a note for posterity's sake: adding active format reconstruction to PLAINTEXT is wrong. Adding PLAINTEXT is more complicated than it originally seemed, because even though every remaining token is a character token, if there are any character tokens left, they may trigger active format reconstruction. This is something I'll try and fix

@dmsnell commented on PR #7117:


5 weeks ago
#6

Fragment support extracted into https://github.com/WordPress/wordpress-develop/pull/7141 where I thought I had already done so, sorry!

@jonsurrell commented on PR #7117:


5 weeks ago
#7

Thanks, I'll revert the changes to support arbitrary fragments here and continue to only support body. That work is more complicated and can continue in #7141.

Note: See TracTickets for help on using tickets.