[wp-trac] [WordPress Trac] #58087: Fix the 'data' dynamic property in WP_Term

WordPress Trac noreply at wordpress.org
Thu Aug 15 18:06:50 UTC 2024


#58087: Fix the 'data' dynamic property in WP_Term
-------------------------------------+-------------------------------------
 Reporter:  antonvlasenko            |       Owner:  hellofromTonya
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  6.7
Component:  Taxonomy                 |     Version:  6.3
 Severity:  minor                    |  Resolution:
 Keywords:  php82 needs-testing      |     Focuses:  coding-standards, php-
  has-patch has-unit-tests early     |  compatibility
-------------------------------------+-------------------------------------

Comment (by hellofromTonya):

 Replying to [comment:33 antonvlasenko]:
 > Another reason for not adding a private property was risk of breaking
 plugins that cast an `WP_Term` object to an array:
 https://www.wpdirectory.net/search/01HWR887XBHDYRN6G0E7N0SVZA
 > FYI, this new [https://github.com/WordPress/wordpress-develop/pull/6426
 PR] incorporates the suggestion mentioned in
 https://core.trac.wordpress.org/ticket/56034#comment:70.

 Noting: This issue can be avoided by giving the property a unique name
 other than `data`.

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


More information about the wp-trac mailing list