Fatal Error when activating plugin
-
I’m working on a plugin, and I started writing a class to better organize the plugin. It all works fine when the plugin is active in WordPress.
The problem came in trying to test the plugin with a network activation with MULTISITE enabled. When trying to activate I got
Fatal error
warning. It stated I tried to call a member function on a non-object.I think the problem is more that the way WordPress tries to activate the plugin causes the error, and I’m just curious as to how I can avoid this?
A google search revealed others who activated plugins and encountered similar messages.
For now I’ve encapsulated the main plugin page in an if statement, so if the current page is the wp-admin/plugins.php file it essentially skips past my code, and allows the plugin to be activated.
On clicking any other link in the wp-admin or on the public side of the site it works just fine, no issues, no PHP errors…. just when activating the plugin in WP.
- The topic ‘Fatal Error when activating plugin’ is closed to new replies.