WordPress.org

Make WordPress Core

Opened 18 months ago

Last modified 18 months ago

#22194 new defect (bug)

PHP x64 compatibility issue with date values

Reported by: Whissi Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version:
Component: Date/Time Keywords:
Focuses: Cc:

Description

Hi,

seems like WordPress is using the "0000-00-00 00:00:00" value as magic value for date values, which aren't set instead of NULL.

This is working fine for any PHP x86 builds, because the magic value is also an invalid date.

But PHP x64 builds support this value. It is no longer invalid. It is now a valid date! This will result in problems, because some functions are expecting that parsing this date will return false, but now on x64 systems they won't get an invalid date, when they are expecting one.

So the problem is, that WordPress is using a valid date as magic value for an invalid date aka default value.

Fixing this issue will require a SQL schema change and to update all the code, checking for "0000-00-00 00:00:00"...

For references, see ticket #21987 and https://bugs.php.net/bug.php?id=53662

Change History (1)

comment:1 SergeyBiryukov18 months ago

  • Component changed from General to Date/Time
Note: See TracTickets for help on using tickets.