[wp-trac] [WordPress Trac] #23307: shortcode_parse_atts may return empty string
WordPress Trac
noreply at wordpress.org
Thu Feb 20 08:40:52 UTC 2014
#23307: shortcode_parse_atts may return empty string
------------------------------------------+------------------
Reporter: GaryJ | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9
Component: Shortcodes | Version:
Severity: minor | Resolution:
Keywords: needs-unit-tests needs-patch | Focuses:
------------------------------------------+------------------
Comment (by GaryJ):
Replying to [comment:10 TobiasBg]:
> An array with a single empty string in it feels wrong. Also, `empty()`
checks (which plugins might be doing to catch the empty string that's
returned currently) would fail.
> The correct return value should be an empty array.
If the string is empty (i.e. `[foobar]`), then my attached patch already
ensures an empty array is returned.
What that last suggestion covers is the edge case when some non-empty
string fails the regex.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23307#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list