WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#10445 closed defect (bug) (fixed)

Undefined variable: term in wp-includes/taxonomy.php on line 188

Reported by: sirzooro Owned by: andy
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.8.1
Component: Taxonomy Keywords: has-patch tested
Focuses: Cc:

Description

Notice: Undefined variable: term in C:\wordpress.local\wp-includes\taxonomy.php on line 188

This notice appears when taxonomy does not want query var. Attached patch fixes it.

Attachments (1)

taxonomy.php.diff (640 bytes) - added by sirzooro 7 years ago.

Download all attachments as: .zip

Change History (13)

#1 @westi
7 years ago

  • Keywords needs-testing added
  • Milestone changed from 2.9 to Future Release

Needs testing.

Moving to future for now.

#2 @sirzooro
7 years ago

  • Keywords tested added; needs-testing removed
  • Milestone changed from Future Release to 2.9

I use this patch on my dev machine and so far I have not found any problems with custom taxonomies because of it.

#3 follow-ups: @markjaquith
7 years ago

  • Milestone changed from 2.9 to Future Release
  • Owner changed from filosofo to ryan
  • Status changed from new to assigned

I'd like an explanation of why $term should be removed. It seems like it should be important. :-) I don't want to delete it without knowing why it is considered useless.

Ryan, do you know what's going on here?

#4 @dd32
7 years ago

I have absolutely no idea what the $term was meant to be for there..

At present, Its operating as it would without it being there.

Since that function has absolutely no idea about the data of the term, it can safely be removed.

That function basically sets it to either:

"issue=" or "taxonomy=issue&term="

which seems like the correct functionality.. as then it'll get substituted as "issue=44" or "taxonomy=issue&term=44" in the query parsing.

#5 in reply to: ↑ 3 @filosofo
7 years ago

Replying to markjaquith:

I'd like an explanation of why $term should be removed. It seems like it should be important. :-) I don't want to delete it without knowing why it is considered useless.

Ryan, do you know what's going on here?

Why don't you ask Andy? He's the one who wrote it:

http://core.trac.wordpress.org/attachment/ticket/6357/6357---.diff

#6 @sirzooro
7 years ago

Any update on this? As @dd32 said, it should work as-is.

#7 @hakre
7 years ago

  • Milestone changed from Future Release to 3.0

Some other warning tickets for Reference: #11435, #11504, #11521

#8 in reply to: ↑ 3 @hakre
7 years ago

Replying to markjaquith:

I'd like an explanation of why $term should be removed. It seems like it should be important. :-)

Well it's dead simple: It's always undefined / null there. Or can you say why it seems important to you?

#9 @hakre
7 years ago

Looks like a conflict of assuming validity of code between dd32 and filosofo en contraire of markjaquith (taking only names of core-devs into consideration). I suggest that markjaquith finalizes his statement while taking the comments following his question into account to formulate a new statement.

It should then be more simple for a core dev to decide wether to commit or just to close this ticket as wontfix.

#10 @hakre
7 years ago

Another warning/notices related ticket: #11606

#11 @dd32
7 years ago

  • Cc andy added
  • Owner changed from ryan to andy
  • Status changed from assigned to reviewing

CC'ing to andy and setting review to andy in the hope of some feedback

#12 @dd32
7 years ago

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

(In [13597]) Fix double slashing on /index.phptaxonomy/term/ links. Props Scribu. Fixes #12508. Also Fixes #10445

Note: See TracTickets for help on using tickets.