[wp-trac] [WordPress Trac] #43498: PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted
WordPress Trac
noreply at wordpress.org
Wed Mar 14 06:16:41 UTC 2018
#43498: PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted
--------------------------+------------------------------
Reporter: arena | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by dd32):
Replying to [comment:6 arena]:
> The issue is that do_action() uses apply_filters(), which initialize by
default an argument ($args) => var_dump => string(0) ""
>
> do_action() should not pass '''any''' argument if not required.
See #14881 - Unfortunately removing this would cause 10 years of back-
compat issues.
If you have an action to hook, and don't intend for it to receive a
parameter, but it has a default value for it's first argument, pass `0` as
the number of `$accepted_args`.
If the root cause of this ticket is `do_action()` passing an empty string
by default, unfortunately this is a duplicate and it's not something that
will be fixed/changed in WordPress.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43498#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list