[wp-trac] [WordPress Trac] #52298: Using ID as type string instead of int

WordPress Trac noreply at wordpress.org
Thu Jan 14 21:37:36 UTC 2021


#52298: Using ID as type string instead of int
-------------------------------+----------------------
 Reporter:  malthert           |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  General            |     Version:
 Severity:  normal             |  Resolution:  wontfix
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+----------------------
Changes (by johnbillion):

 * status:  new => closed
 * version:  trunk =>
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 Changing this would break every plugin and theme that uses strict types or
 strict comparison (`===`).

 A post ID is an integer. It's a BIGINT in the database. It's typecast
 internally because it's read from the database as a string, which is
 unfortunate, but that ship sailed fifteen years ago.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52298#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list