aggregator icon indicating copy to clipboard operation
aggregator copied to clipboard

PHP notice due to Aggregator_Jobs_List_Table being called on AJAX request

Open mikeselander opened this issue 8 years ago • 0 comments

Aggregator->admin_init() is getting called on AJAX actions which is causing an error in the Aggregator_Jobs_List_Table where screen isn't being set (since it shouldn't be loaded in AJAX and has no screen on a heartbeat call for example) which is throwing a PHP notice.

Notice and Trace

[05-Oct-2016 21:16:51 UTC] PHP Notice:  Undefined index: hook_suffix in /srv/www/site/wp-admin/includes/class-wp-screen.php on line 229
[05-Oct-2016 21:16:51 UTC] PHP Stack trace:
[05-Oct-2016 21:16:51 UTC] PHP   1. {main}() /srv/www/site/wp-admin/admin-ajax.php:0
[05-Oct-2016 21:16:51 UTC] PHP   2. do_action($tag = 'admin_init', $arg = *uninitialized*) /srv/www/site/wp-admin/admin-ajax.php:44
[05-Oct-2016 21:16:51 UTC] PHP   3. Aggregator->admin_init('') /srv/www/site/wp-includes/plugin.php:524
[05-Oct-2016 21:16:51 UTC] PHP   4. Aggregator_Jobs_List_Table->__construct() /srv/www/site/wp-content/plugins/aggregator-fork/class-aggregator.php:77
[05-Oct-2016 21:16:51 UTC] PHP   5. WP_List_Table->__construct($args = array ('plural' => 'wp_list_aggregator_jobs', 'singular' => 'wp_list_aggregator_job', 'ajax' => FALSE, 'screen' => NULL)) /srv/www/site/wp-content/plugins/aggregator-fork/class-aggregator-jobs-list-table.php:20
[05-Oct-2016 21:16:51 UTC] PHP   6. convert_to_screen($hook_name = NULL) /srv/www/site/wp-admin/includes/class-wp-list-table.php:143
[05-Oct-2016 21:16:51 UTC] PHP   7. WP_Screen::get($hook_name = NULL) /srv/www/site/wp-admin/includes/template.php:2003

mikeselander avatar Oct 06 '16 10:10 mikeselander