[wp-trac] [WordPress Trac] #57205: PHP 8.1 warning : Implicit conversion from float 9.9 to int loses precision

WordPress Trac noreply at wordpress.org
Fri Jan 20 15:04:02 UTC 2023


#57205: PHP 8.1 warning : Implicit conversion from float 9.9 to int loses precision
-------------------------------------+----------------------
 Reporter:  roadlink                 |       Owner:  (none)
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:
Component:  General                  |     Version:  4.7
 Severity:  normal                   |  Resolution:  invalid
 Keywords:  php81 reporter-feedback  |     Focuses:
-------------------------------------+----------------------

Comment (by mcaskill):

 Thank you for the confirmation on the matter.

 I'll be sure to take this up with the offending third-parties.

 In which case, should integers be enforced with an `is_int()` check that
 either returns false or calls `_doing_it_wrong()`?

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


More information about the wp-trac mailing list