Opened 6 years ago

Closed 6 years ago

#4166 closed defect (bug) (fixed)

Fix mktime() inside mysql2date() in wp-includes/functions.php

Reported by: josephscott Owned by: rob1n
Priority: low Milestone: 2.2
Component: General Version: 2.2
Severity: minor Keywords: has-patch commit
Cc:

Description

All of the parameters to mktime() are supposed to be of type int. The problem is that substr() is being used to provide each parameter and it returns a string, not an int. This isn't fatal because PHP will do the conversion for you, but it does through a warning. The simple way to deal with this is to cast all of the substr() calls to int.

Attachments (1)

functions.php-dif (547 bytes) - added by josephscott 6 years ago.

Download all attachments as: .zip

Change History (4)

  • Keywords has-patch added
  • Milestone changed from 2.4 to 2.2
  • Version set to 2.2
  • Keywords commit added; mysql2date mktime removed
  • Owner changed from anonymous to rob1n

Looks good.

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

(In [5284]) Cast substr()'s to int before passing through mktime() to prevent warning. Props josephscott. fixes #4166

Note: See TracTickets for help on using tickets.