Notifications
Clear all

PHP Fatal Error: Call to undefined function get_current_screen

2 Posts
2 Users
0 Likes
2,631 Views
Posts: 14
Customer
Topic starter
(@webtoolsframeworks)
Member
Joined: 7 years ago

 When creating posts via a cron job WP Discuz Media Uploader throws a fatal php error:

PHP Fatal error:  Call to undefined function get_current_screen() in /var/foo/bar/public/wp-content/plugins/wpdiscuz-media-uploader/utils/class.WMUHelper.php on line 432

The fix (work-around) is to add 'require_once(ABSPATH . ‘wp-admin/includes/screen.php’);' to line 432 of wpdiscuz-media-uploader/utils/class.WMUHelper.php.

Any chance this will be fixed in an upcoming release?

1 Reply
Posts: 4171
 Tom
Admin
(@tomson)
Famed Member
Joined: 9 years ago

Could you please provide more details? How do you use WP Cron? We can add a new condition in next version to avoid such errors.

Reply
Share:
Scroll to top