WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#4818 closed defect (bug) (fixed)

$newday global declaration is unnecessary, and $currentmonth not global'ed

Reported by: JeremyVisser Owned by:
Milestone: 2.3 Priority: low
Severity: normal Version: 2.3
Component: Template Keywords:
Focuses: Cc:

Description


Attachments (2)

general-template.php.diff (468 bytes) - added by JeremyVisser 8 years ago.
Removes excess global declaration.
4818.2.diff (995 bytes) - added by JeremyVisser 8 years ago.
Fixes both problems described.

Download all attachments as: .zip

Change History (7)

comment:1 @JeremyVisser8 years ago

Sorry, blank ticket.

In wp-includes/general-template.php, there is a global declaration of $newday in function the_date(), but it is never used. Attaching a patch to get rid of it.

@JeremyVisser8 years ago

Removes excess global declaration.

comment:2 @JeremyVisser8 years ago

  • Severity changed from trivial to normal
  • Summary changed from $newday global declaration is unnecessary to $newday global declaration is unnecessary, and $currentmonth not global'ed

In addition, $currentmonth is set in setup_postdate() in wp-includes/query.php, but never global'ed.

(It was preventing me from creating a custom the_month() function like the_date(), making this ticket slightly more serious.)

@JeremyVisser8 years ago

Fixes both problems described.

comment:3 @ryan8 years ago

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

(In [5944]) Add missing global and remove unused var. Props JeremyVisser. fixes #4818

comment:4 @JeremyVisser8 years ago

  • Milestone changed from 2.3 to 2.2.3
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 2.3 to 2.2.2

Backport to 2.2.3?

comment:5 @DD327 years ago

  • Milestone changed from 2.2.3 to 2.3
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Version changed from 2.2.2 to 2.3

2.2.x is not maintained anymore, changing back to fixed.

Note: See TracTickets for help on using tickets.