WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 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:

Description

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 8 years ago.
comment-template-php.diff (604 bytes) - added by jhodgdon 8 years ago.
Remove unused globals in comments-template function

Download all attachments as: .zip

Change History (9)

comment:1 @foolswisdom8 years ago

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

comment:2 @markjaquith8 years ago

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

comment:3 @filosofo8 years ago

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

comment:4 @foolswisdom8 years ago

  • Milestone changed from 2.2 to 2.3

comment:5 @jhodgdon8 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.

@jhodgdon8 years ago

Remove unused globals in comments-template function

comment:6 @rob1n8 years ago

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

comment:7 @rob1n8 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.