[wp-trac] [WordPress Trac] #59249: shortcode_parse_atts() result for no attributes does not match the documentation

WordPress Trac noreply at wordpress.org
Sat Sep 30 08:18:29 UTC 2023


#59249: shortcode_parse_atts() result for no attributes does not match the
documentation
----------------------------+---------------------
 Reporter:  SergeyBiryukov  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  6.4
Component:  Shortcodes      |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  2nd-opinion     |     Focuses:
----------------------------+---------------------

Comment (by oglekler):

 From a logical point, it is better when the return value is consistent. In
 many cases change of return value can introduce a regression or need of
 change to plugins/themes, but because of each returning in an array
 attribute needs to be checked before usage anyway, I cannot imagine a
 regression in this case.
 So, I am suggesting to return empty array if there are no actual
 attributes.

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


More information about the wp-trac mailing list