Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#10445 closed defect (bug) (fixed)

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

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

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 17 years ago.

Download all attachments as: .zip

Change History (13)

#1 @westi
17 years ago

  • Keywords needs-testing added
  • Milestone 2.9 → Future Release

Needs testing.

Moving to future for now.

#2 @sirzooro
17 years ago

  • Keywords tested added; needs-testing removed
  • Milestone Future Release → 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
17 years ago

  • Milestone 2.9 → Future Release
  • Owner changed from filosofo to ryan
  • Status new → 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
17 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
17 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
17 years ago

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

#7 @hakre
17 years ago

  • Milestone Future Release → 3.0

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

#8 in reply to: ↑ 3 @hakre
17 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
17 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
17 years ago

Another warning/notices related ticket: #11606

#11 @dd32
17 years ago

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

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

#12 @dd32
17 years ago

  • Resolution → fixed
  • Status reviewing → 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.