• Hello,

    Thanks for great plugin.

    I’m getting following error from this plugin (PHP version 7.1.2):

    PHP Error Count Location Call Stack Component
    Warning session_start() expects parameter 1 to be array, string given 1 wp-includes/class-wp-hook.php:298 session_start()
    wp-includes/class-wp-hook.php:298
    do_action(‘init’)
    wp-settings.php:448 Core

    How to fix ?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • A temporary fix for me is to comment out the following line in the WP Spam Fighter plugin file named “wp-spam-fighter.php”

    This is in no way a permanent solution. If anyone knows how to correctly fix this, please let me know.

    Thanks!

    public function register_hook_callbacks()
            {
                add_action('wpmu_new_blog', __CLASS__ . '::activate_new_site');
                add_action('wp_enqueue_scripts', __CLASS__ . '::load_resources');
                add_action('admin_enqueue_scripts', __CLASS__ . '::load_resources');
                add_action('login_enqueue_scripts', __CLASS__ . '::load_resources');
    
                add_action('comment_form_before', array($this, 'comment_form_before'));
                add_action('comment_form_after_fields', array($this, 'comment_form_after_fields'), 1);
                add_action('comment_form_logged_in_after', array($this, 'comment_form_after_fields'), 1);
                add_action('pre_comment_on_post', array($this, 'pre_comment_on_post'));
                add_filter('pre_comment_approved', array($this, 'pre_comment_approved'), 10, 2);
                add_action('comment_post', array($this, 'comment_post'), 10, 2);
                add_filter('preprocess_comment', array($this, 'verify_comment_captcha'));
    
                add_action('register_form', array($this, 'register_form'));
                add_action('signup_extra_fields', array($this, 'register_form'));
                add_filter('registration_errors', array($this, 'registration_errors'), 10, 3);
                add_filter('wpmu_validate_user_signup', array($this, 'wpmu_validate_user_signup'), 10, 1);
    
                //add_action('init', 'session_start'); // Error: Warning: session_start() expects parameter 1 to be array, string given in C:\xampp\htdocs\imagedepotsandbox\wp-includes\class-wp-hook.php on line 286
    
                add_action('init', array($this, 'init'));
                add_action('init', array($this, 'upgrade'), 11);
            }

    The temporary fix I posted above seemed to cause Session conflicts. I’ve disabled the plugin.

    Would love a solution to this. I really liked the simplicity of this plugin and the lack of bloat.

    • This reply was modified 6 years, 10 months ago by joshmakar.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Error’ is closed to new replies.