Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#17448 closed defect (bug) (fixed)

Make sure $tz is not empty in get_gmt_from_date()

Reported by: johnjamesjacoby Owned by: nacin
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: Date/Time Keywords: has-patch
Focuses: Cc:


It's possible that $tz might still be empty by default, which causes errors when posting new content.

See r17920 for where this was introduced.

Attachments (1)

17448.patch (828 bytes) - added by johnjamesjacoby 5 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nacin
5 years ago

  • Owner set to nacin
  • Status changed from new to accepted

#2 @ryan
5 years ago

Perhaps we need to revert back and just remove the class_exists() check.

#3 @johnjamesjacoby
5 years ago

Yep, that's what needs to happen.

My patch prevents the error, but results in the post_date and post_date_gmt being the same.

#4 @ryan
5 years ago

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

In [17958]:

Revert part of [17920]. Support for empty tz must remain. Props johnjamesjacoby. fixes #17448

Note: See TracTickets for help on using tickets.