WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 5 months ago

#47127 new defect (bug)

Parameter Error in class-wp-hook files

Reported by: walkinverse Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 5.1.1
Component: Cron API Keywords:
Focuses: Cc:
PR Number:

Description

After update, I am getting these in the logs, tens of thousands of lines of the same thing over and over again. I have to delete logs daily as the size grows into the 10+ megs. It is odd.

This repeats over and over again without ceasing. I removed all plugins and switched to the default theme and the error still persists. It has to do with the core.

[05-May-2019 12:50:43 UTC] PHP Warning: call_user_func_array() expects parameter 2 to be array, null given in /home/public_html/wp-includes/class-wp-hook.php on line 286
[05-May-2019 12:50:43 UTC] PHP Notice: Undefined index: args in /home/public_html/wp-cron.php on line 118
[05-May-2019 12:50:43 UTC] PHP Notice: Undefined index: args in /home/public_html/wp-cron.php on line 122
[05-May-2019 12:50:43 UTC] PHP Notice: Undefined index: args in /home/public_html/wp-cron.php on line 133
[05-May-2019 12:50:43 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/public_html/wp-includes/class-wp-hook.php on line 272

Change History (5)

#1 follow-up: @joyously
6 months ago

  • Focuses performance coding-standards removed

Perhaps one of your plugins started a cron job with bad parameters, that continued after removing the plugin. If it was a core problem, we would all have big log files. But we don't.

#2 in reply to: ↑ 1 @walkinverse
6 months ago

Replying to joyously:

Perhaps one of your plugins started a cron job with bad parameters, that continued after removing the plugin. If it was a core problem, we would all have big log files. But we don't.

No, this is not a plugin issue. As a further test, I deleted all non-core cron jobs as well as deleted every single plugin to the bare minimum. Yet, it still generates thousands of lines of warning.

In addition after further research, many were having this exact same issue and it was supposed to be resolved in the update. Maybe something was missed as I am getting the same issue.

[05-May-2019 21:36:33 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/wp-includes/class-wp-hook.php on line 275
[05-May-2019 21:36:33 UTC] PHP Warning:  call_user_func_array() expects parameter 2 to be array, null given in /var/www/html/wp-includes/class-wp-hook.php on line 294

In the actual file error happen here:

line 272:

$num_args                           = count( $args );


line 286:

} elseif ( $the_['accepted_args'] >= $num_args ) {
                $value = call_user_func_array( $the_['function'], $args );

The countable seems to point to a database issue. The same issue in the previous release. I also updated to 5.1.1 and still receive this issue.

public function apply_filters( $value, $args ) {

Also, all custom functions have also been removed.

#3 @walkinverse
6 months ago

Another update completely gutted down to the base and it is still generating these error. Every google search points back to a core issue and others have had this before. It seems as if it is tied into CRON and I have no cron job, only those available via Wordpress. Everything has been deleted.

List of images to show the current state:

https://www.dropbox.com/s/36fubducah0vi72/Screenshot%202019-05-05%2019.15.33.png?dl=0

https://www.dropbox.com/s/rjoecb66n0uv9dr/Screenshot%202019-05-05%2019.18.41.png?dl=0

Few other errors once I started stripping it down

https://www.dropbox.com/s/25dii539gozxzar/Screenshot%202019-05-05%2019.22.40.png?dl=0

https://www.dropbox.com/s/r3zmsj5lhv0uqvm/Screenshot%202019-05-05%2019.23.11.png?dl=0

Cron Jobs, shows null args.

https://www.dropbox.com/s/0omq84vbzdtn1lw/Screenshot%202019-05-05%2019.49.40.png?dl=0

#4 @SergeyBiryukov
5 months ago

  • Component changed from General to Cron API

#5 @walkinverse
5 months ago

Another update. I went ahead of updated to the newest version of WordPress 5.2 and I get this also. Besides a Cron issue this Undefined index: args is also a common issue. Almost seems like something deprecated was missed.

[09-May-2019 02:22:15 UTC] PHP Notice: Undefined index: args in /var/www/html/wp-admin/includes/class-wp-site-health.php on line 1897
[09-May-2019 02:22:15 UTC] PHP Notice: Undefined index: args in /var/www/html/wp-admin/includes/class-wp-site-health.php on line 1897
[09-May-2019 02:22:15 UTC] PHP Notice: Undefined index: args in /var/www/html/wp-admin/includes/class-wp-site-health.php on line 1897
[09-May-2019 02:22:15 UTC] PHP Notice: Undefined index: args in /var/www/html/wp-admin/includes/class-wp-site-health.php on line 1897

Note: See TracTickets for help on using tickets.