[wp-trac] [WordPress Trac] #14881: do_action should not pass empty string by default
WordPress Trac
noreply at wordpress.org
Mon Feb 1 18:25:37 UTC 2016
#14881: do_action should not pass empty string by default
---------------------------------+-----------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Plugins | Version:
Severity: normal | Resolution:
Keywords: has-patch 3.2-early | Focuses:
---------------------------------+-----------------------------
Comment (by kjbenk):
This ticket seems like a great fix but what negative implications does it
have on developers? It seems like if the developer does not specific any
args within the `add_action()` function then their function should not
have any args, but I understand your point for edge cases and returning
the proper result.
Based off of your diff it seems that you are returning an empty array
instead of an empty string. Would you want to return NULL instead? An
empty array might confuse developers into thinking that it is actually an
argument to the action. However, a NULL value is much more related to an
error. Please let me know your thoughts @nacin.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14881#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list