[wp-trac] [WordPress Trac] #61242: PHP warning when `'taxonomies'` in `register_post_type` is set to `false` instead of `array()`

WordPress Trac noreply at wordpress.org
Mon May 20 11:10:42 UTC 2024


#61242: PHP warning when `'taxonomies'` in `register_post_type` is set to `false`
instead of `array()`
-------------------------------+------------------------------
 Reporter:  siddiquesaad       |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  6.5.3
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+------------------------------

Comment (by jrf):

 What @swissspidy said. Additionally, if this warning occurs, there must be
 a coding error somewhere, which is exactly what the warning is telling you
 about. Such warnings should never be hidden, as that ''hides'' useful
 information about a bug which needs to be fixed.

 The bug should be fixed in the place where it originates, which can be
 found via a backtrace.

 The current patch is definitely not the way to go.

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


More information about the wp-trac mailing list