[wp-trac] [WordPress Trac] #36435: Explicitly cast numeric values

WordPress Trac noreply at wordpress.org
Thu Apr 7 03:06:12 UTC 2016


#36435: Explicitly cast numeric values
----------------------------+----------------------------
 Reporter:  pento           |      Owner:
     Type:  task (blessed)  |     Status:  new
 Priority:  normal          |  Milestone:  Future Release
Component:  General         |    Version:
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+----------------------------
 PHP 7.1 will include warnings when invalid values are being used in
 numeric operations, per
 [https://wiki.php.net/rfc/invalid_strings_in_arithmetic this RFC].

 This is currently manifesting itself as a [https://travis-
 ci.org/aaronjorbin/develop.wordpress/jobs/121292609#L345 single unit test
 error against PHP Nightly], but it's likely that there are more places
 we'll see this warning, which aren't being covered by unit tests.

 I'm not aware of any static analysis tools that are covering this case
 yet, but in the mean time, we could potentially look for problem code with
 some simple searching.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36435>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list