#6977 closed defect (bug) (fixed)
Undefined indexes for $redirect and $original in redirect_canonical
| Reported by: | minddog | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Canonical | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
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)
Change History (9)
This ticket was mentioned in PR #7117 on WordPress/wordpress-develop by @jonsurrell.
2 years 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.
2 years 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.
2 years 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
2 years 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:
2 years 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Already been fixed.