[wp-trac] [WordPress Trac] #23307: shortcode_parse_atts may return empty string

WordPress Trac noreply at wordpress.org
Mon Feb 3 01:37:41 UTC 2014


#23307: shortcode_parse_atts may return empty string
----------------------------------------+------------------------------
 Reporter:  GaryJ                       |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Shortcodes                  |     Version:
 Severity:  minor                       |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------
Changes (by nacin):

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 This needs unit tests. I'd also be curious when this was introduced —
 what's the history here?

 Patch doesn't look complete — if the pattern fails, it'd also return a
 string ( `ltrim( $text )` ). We should make it as consistent as possible.

 I don't think there would be a BC break of concern here. The function may
 also be able to return an empty array if given the right arguments. But I
 wouldn't expect someone to be asserting a string.

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


More information about the wp-trac mailing list