Title: Solution for php Error in class-wp-hook
Last modified: August 5, 2022

---

# Solution for php Error in class-wp-hook

 *  [d1plom4t](https://wordpress.org/support/users/d1plom4t/)
 * (@d1plom4t)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/solution-for-php-error-in-class-wp-hook/)
 * Hey,
 * in case anyone is still using this great plugin:
 * I found the solution for the warning in the wp-class-hook.php, which gives the
   log warning
 * Got error ‘PHP message: PHP Warning: session_start() expects parameter 1 to be
   array, string given in …/wp-includes/class-wp-hook.php
 * My simple Solution is to replace line 233 in wp-spam-fighter.php as follows:
 *  //add_action(‘init’, ‘session_start’); ERROR?
    session_start();
 * Any opinions?

The topic ‘Solution for php Error in class-wp-hook’ 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/)

 * 0 replies
 * 1 participant
 * Last reply from: [d1plom4t](https://wordpress.org/support/users/d1plom4t/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/solution-for-php-error-in-class-wp-hook/)
 * Status: not resolved