[wp-trac] [WordPress Trac] #53235: Ensure consistent type for integer properties of WP_Post, WP_Term, and WP_User

WordPress Trac noreply at wordpress.org
Thu May 20 00:37:06 UTC 2021


#53235: Ensure consistent type for integer properties of WP_Post, WP_Term, and
WP_User
--------------------------------------+-----------------------------
 Reporter:  SergeyBiryukov            |       Owner:  SergeyBiryukov
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  5.8
Component:  General                   |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch needs-dev-note  |     Focuses:
--------------------------------------+-----------------------------

Comment (by peterwilsoncc):

 Replying to [comment:6 SergeyBiryukov]:
 > Could that be about the `WP_Post::post_author` and
 `WP_Post::comment_count` properties in #22324? They were indeed left as a
 string at the time for backward compatibility.

 The slack discussion mentions term IDs, I remember because I was sitting
 next to a theme author who discovered the type change when they had
 something along the lines of `get_option( 'my_special_term_id' ) === /* a
 term ID */` in their code

 > In this ticket, we're not changing the type of properties, just making
 sure they always match the documented type.

 Excellent. In that case, I expect it's not a problem for this ticket and
 the solution at the time was a dev note.

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


More information about the wp-trac mailing list