[wp-trac] [WordPress Trac] #37050: Make the `WP_Network` `id` property an int
WordPress Trac
noreply at wordpress.org
Wed Jun 8 04:26:00 UTC 2016
#37050: Make the `WP_Network` `id` property an int
--------------------------------+--------------------------------------
Reporter: jeremyfelt | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.6
Component: Networks and Sites | Version: 4.4
Severity: normal | Keywords: dev-feedback 2nd-opinion
Focuses: multisite |
--------------------------------+--------------------------------------
#36717 introduced magic methods for `WP_Network` and we now have a
mechanism for forcing the `id` property of `WP_Network` to `int` rather
than `string`.
When `WP_Network` was introduced in [34097], the `id` property was
incorrectly marked as `int`, which @jdgrimes highlighted in #35404. We
adjusted this back to `string` for 4.5 to match the returned value.
For general developer sanity, it would be nice to cast `id` to an `int`
and change the documentation. This would however break backwards
compatibility for anyone doing strict comparisons with a string.
If determined to be worth it, I'd like to get it in soon so that we give
things a chance to break.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37050>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list