Conversation
supportI would like to include Post Network in a site I am working on. I am using WordPress on a DreamHost site. WordPress version 6.1.1, PHP 8.0. Has anyone seen this problem? Is there a fix? When I try to activate the plugin I get this error (replacing my domain with mysite.com): Fatal error: Uncaught Error: Using $this when not in object context in /home/dh_7zqbrb/mysite.com/wp-content/plugins/post-network/includes/admin.php:536 Stack trace: #0 /home/dh_7zqbrb/mysite.com/wp-content/plugins/post-network/post-network.php(53): PostNetwork::pn_option_init() #1 /home/dh_7zqbrb/mysite.com/wp-includes/class-wp-hook.php(308): pn_activation(”) #2 /home/dh_7zqbrb/mysite.com/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #3 /home/dh_7zqbrb/mysite.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/dh_7zqbrb/mysite.com/wp-admin/plugins.php(194): do_action(‘activate_post-n…’) #5 {main} thrown in /home/dh_7zqbrb/mysite.com/wp-content/plugins/post-network/includes/admin.php on line 536 The code at issue: public static function pn_option_init() { $fields = $this->pn_get_fields(); # THIS LINE GIVES THE ERROR $default_settings = array_column( $fields, ‘default’, ‘id’ ); update_option( self::$option_name, $default_settings ); } Has anyone seen this problem? Is there a fix?
@dmischel Fixed this error in ver.1.4.1 Thank you!
Thanks. I can confirm that installation now works. However, activation fails and I’ll post that on a separate thread since this is now resolved.
@dmischel Fixed this error in ver.1.4.1 Thank you!
Thanks. I can confirm that installation now works. However, activation fails and I’ll post that on a separate thread since this is now resolved.