Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#3980 closed defect (bug) (wontfix)

Comments template mis-named variable

Reported by: filosofo Owned by: rob1n
Milestone: Priority: lowest
Severity: trivial Version: 2.2
Component: General Keywords: comments_template comments has-patch
Focuses: Cc:


The comments_template function declares a global '$comment' variable that it never uses.

It should be '$comments', not '$comment'.

Attachments (2)

comment-template.php.diff (534 bytes) - added by filosofo 11 years ago.
comment-template-php.diff (604 bytes) - added by jhodgdon 11 years ago.
Remove unused globals in comments-template function

Download all attachments as: .zip

Change History (9)

#1 @foolswisdom
11 years ago

  • Keywords has-patch added
  • Milestone changed from 2.3 to 2.2

#2 @markjaquith
11 years ago

$comments doesn't have to be global, as the comments template is included from within the function.

#3 @filosofo
11 years ago

True, now that there's the 'comments_array' filter, '$comment' can just be deleted.

#4 @foolswisdom
11 years ago

  • Milestone changed from 2.2 to 2.3

#5 @jhodgdon
11 years ago

  • Component changed from Administration to General
  • Priority changed from low to lowest
  • Severity changed from normal to trivial

Turns out there were a bunch of unused globals. Attaching patch to remove all unused ones. Not high priority to install patch.

11 years ago

Remove unused globals in comments-template function

#6 @rob1n
11 years ago

  • Milestone changed from 2.3 to 2.2
  • Owner changed from anonymous to rob1n

#7 @rob1n
11 years ago

  • Milestone 2.2 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Some templates may rely on these variables being there in the global scope, so wontfix. Also, the default theme itself breaks if you take some of those variables off of the global declaration.

Note: See TracTickets for help on using tickets.