Ticket #4818 (closed defect: fixed)

Opened 1 year ago

Last modified 9 months ago

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

Reported by: JeremyVisser Assigned to: anonymous
Priority: low Milestone: 2.3
Component: Template Version: 2.3
Severity: normal Keywords:
Cc:

Attachments

general-template.php.diff (468 bytes) - added by JeremyVisser on 08/26/07 12:22:19.
Removes excess global declaration.
4818.2.diff (1.0 kB) - added by JeremyVisser on 08/26/07 12:35:07.
Fixes both problems described.

Change History

08/26/07 12:21:56 changed by JeremyVisser

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.

08/26/07 12:22:19 changed by JeremyVisser

  • attachment general-template.php.diff added.

Removes excess global declaration.

08/26/07 12:34:39 changed by JeremyVisser

  • 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.)

08/26/07 12:35:07 changed by JeremyVisser

  • attachment 4818.2.diff added.

Fixes both problems described.

08/26/07 17:12:31 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

08/27/07 00:14:46 changed by JeremyVisser

  • status changed from closed to reopened.
  • version changed from 2.3 to 2.2.2.
  • resolution deleted.
  • milestone changed from 2.3 to 2.2.3.

Backport to 2.2.3?

12/09/07 12:14:31 changed by DD32

  • status changed from reopened to closed.
  • version changed from 2.2.2 to 2.3.
  • resolution set to fixed.
  • milestone changed from 2.2.3 to 2.3.

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