﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
21337,COMMENTS_TEMPLATE: cannot define a constant twice in PHP,kitchin,ryan,"A minor PHP issue in wp-includes/comment-template.php in comments_template() :
{{{
if ( !defined('COMMENTS_TEMPLATE') || !COMMENTS_TEMPLATE)
	define('COMMENTS_TEMPLATE', true);
}}}
PHP does not allow constants to be re-defined, so the clause ""!COMMENTS_TEMPLATE"" can have no effect other than raise a warning.

The patch removes the clause.

Normally this warning would happen if comments_template() is called twice by the theme, but the subsequent require() statement would raise an error anyway.

In one edge case it might not raise an error:
1. Theme calls comments_template()
2. Theme calls comments_template() again with a different parameter or after a different filter is in effect.

So the patch loses a warning in that case.

I grepped the codebase and did not find any similar clause before a define().

The conditional code around the define() was added in this changeset: http://core.trac.wordpress.org/changeset/10953",defect (bug),closed,normal,3.5,Comments,3.4.1,trivial,fixed,commit,
