Title: PHP Fatal error &#8211; function add()
Last modified: September 1, 2016

---

# PHP Fatal error – function add()

 *  [Alkerion](https://wordpress.org/support/users/alkerion/)
 * (@alkerion)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/)
 * Hi !
 * Here is the error I get :
 * `PHP Fatal error: Uncaught Error: Call to a member function add() on null in /
   home/clients/3456/web/wp-content/plugins/si-captcha-for-wordpress/si-captcha.
   php:656
    thrown in /home/clients/3456/web/wp-content/plugins/si-captcha-for-wordpress/
   si-captcha.php on line 656 #3 {main} #2 /home/clients/3456/web/wp-login.php(698):
   register_new_user(‘nellieseeley13’, ‘margarettapockr…’) #1 /home/clients/3456/
   web/wp-includes/user.php(2281): apply_filters(‘registration_er…’, NULL, ‘nellieseeley13’,‘
   margarettapockr…’) #0 /home/clients/3456/web/wp-includes/plugin.php(235): siCaptcha-
   >si_captcha_register_post(NULL) Stack trace:
 * This error seems to be returned when the captcha is inaccurate.
 * Any idea what’s going wrong ?
 * Thanks
 * BR
 * Version: 2.7.7.7
 * [https://wordpress.org/plugins/si-captcha-for-wordpress/](https://wordpress.org/plugins/si-captcha-for-wordpress/)

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

 *  Thread Starter [Alkerion](https://wordpress.org/support/users/alkerion/)
 * (@alkerion)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-7544786)
 * I also have the same error on two other sites (http and https)
 * The error is on that line:
 *     ```
       $errors->add('captcha_error', "<strong>$error</strong>: $validate_result");
       ```
   
 * In this function :
 *     ```
       // this function checks the captcha posted with registration
       function si_captcha_register_post($errors) {
          global $si_captcha_dir, $si_captcha_dir_ns, $si_captcha_opt;
   
          $validate_result = $this->si_captcha_validate_code('reg', 'unlink');
          if($validate_result != 'valid') {
              $error = ($si_captcha_opt['si_captcha_error_error'] != '') ? $si_captcha_opt['si_captcha_error_error'] : __('ERROR', 'si-captcha');
              <strong>$errors->add('captcha_error', "<strong>$error</strong>: $validate_result");</strong>
              return $errors;
          }
          return($errors);
       } // end function si_captcha_register_post
       ```
   
 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-7544899)
 * Hi, try the following. Deactivate all your plugins except this one and carry 
   out a test? If that does not fix the problem try one of WordPress defaults themes
   like Twenty Fifteen.
 * Thank you
 *  Thread Starter [Alkerion](https://wordpress.org/support/users/alkerion/)
 * (@alkerion)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8311568)
 * Hi !
 * I’ve never solved this issue on my sites.
 * I’ve built a new site and I still have issues with this plugin.
 * If the captcha field is empty or inaccurate I obtain the error :
 * Error thrown
    Call to a member function add() on null
 * This time there is no PHP error thrown.
    If I enter the right captcha everything
   works as expected.
 * HELP appreciated.
 * Regards
 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8313475)
 * Hi, what PHP version is your server running? I can’t reproduce this error on 
   my test local site or my test life site.
 * Regards
 *  Thread Starter [Alkerion](https://wordpress.org/support/users/alkerion/)
 * (@alkerion)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8314231)
 * HI !
 * I use PHP 7.0.7
 * I’ll try to setup a new site and I’ll check step by step any changes to determine
   what’s going wrong.
 * Regards
 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8343131)
 * [@alkerion](https://wordpress.org/support/users/alkerion/), can you test the 
   latest version 2.7.7.8 and report back.
 * Thank you
 *  Thread Starter [Alkerion](https://wordpress.org/support/users/alkerion/)
 * (@alkerion)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8343560)
 * Hi !
 * It still hang, but I don’t think it’s due to your plugin.
 * Regards
 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8343676)
 * Hi, what do you think is causing the hanging effect in your site?
 *  Thread Starter [Alkerion](https://wordpress.org/support/users/alkerion/)
 * (@alkerion)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8344583)
 * It seems to be the mix between your plugin and “WP-SpamSchield” and “New User
   Approve”.
 * “New User Approve” seems to be the mess maker.
 *  [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8345545)
 * Okay so you have a plugin conflict, is that correct?

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

The topic ‘PHP Fatal error – function add()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/si-captcha-for-wordpress_dde4c1.svg)
 * [SI CAPTCHA Anti-Spam](https://wordpress.org/plugins/si-captcha-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/si-captcha-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/si-captcha-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/si-captcha-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/si-captcha-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/si-captcha-for-wordpress/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-function-add/#post-8345545)
 * Status: not resolved