Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#4818 closed defect (bug) (fixed)

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

Reported by: jeremyvisser's profile 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 17 years ago.
Removes excess global declaration.
4818.2.diff (995 bytes) - added by JeremyVisser 17 years ago.
Fixes both problems described.

Download all attachments as: .zip

Change History (7)

#1 @JeremyVisser
17 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.

@JeremyVisser
17 years ago

Removes excess global declaration.

#2 @JeremyVisser
17 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.)

@JeremyVisser
17 years ago

Fixes both problems described.

#3 @ryan
17 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

#4 @JeremyVisser
17 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?

#5 @DD32
16 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.