Title: PHP Error
Last modified: August 30, 2017

---

# PHP Error

 *  [axelssondesign](https://wordpress.org/support/users/axelssondesign/)
 * (@axelssondesign)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-error-242/)
 * 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 ?
    -  This topic was modified 8 years, 9 months ago by [axelssondesign](https://wordpress.org/support/users/axelssondesign/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-242%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [joshmakar](https://wordpress.org/support/users/joshmakar/)
 * (@joshmakar)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-error-242/#post-9847696)
 * 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);
               }
       ```
   
 *  [joshmakar](https://wordpress.org/support/users/joshmakar/)
 * (@joshmakar)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-error-242/#post-9848835)
 * 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 8 years, 4 months ago by [joshmakar](https://wordpress.org/support/users/joshmakar/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-spam-fighter.svg)
 * [WP Spam Fighter](https://wordpress.org/plugins/wp-spam-fighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-spam-fighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-spam-fighter/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-spam-fighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-spam-fighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-spam-fighter/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)
 * [session_start](https://wordpress.org/support/topic-tag/session_start/)

 * 2 replies
 * 2 participants
 * Last reply from: [joshmakar](https://wordpress.org/support/users/joshmakar/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/php-error-242/#post-9848835)
 * Status: not resolved