PHP Error log spam due to false call of uninstall function

[ad_1]

When in the backend of an installation and WP_DEBUG is enabled I get the following notice every 30 seconds (due to the HeartBeat calls):

PHP Notice: Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /usr/www/users/zeitrm/wp-includes/functions.php on line 5865

This stops immediately after disabling this plugin. Also looking at the source code in file …/plugins/host-webfonts-local/src/Plugin.php#48 shows that a none static method call is used:

register_uninstall_hook( OMGF_PLUGIN_FILE, [ $this, 'do_uninstall' ] );
  • This topic was modified 16 hours, 16 minutes ago by JochenT.
  • This topic was modified 16 hours, 12 minutes ago by JochenT.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer