[wp-trac] [WordPress Trac] #63039: Incorrect type for the $public parameter in 'robots_txt' filter

WordPress Trac noreply at wordpress.org
Mon Mar 3 10:37:14 UTC 2025


#63039: Incorrect type for the $public parameter in 'robots_txt' filter
----------------------------+---------------------
 Reporter:  SergeyBiryukov  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  6.8
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  docs
----------------------------+---------------------

Comment (by kapilpaul):

 Since we are already checking $public as a boolean in other functions, it
 makes more sense to cast it to bool before passing it to the filter. This
 ensures consistency, prevents potential type issues, and aligns with the
 documented type. Updating the documentation instead of casting might
 introduce inconsistencies in how we handle this value across different
 functions.

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


More information about the wp-trac mailing list