Fatal error: Uncaught Error: Call to a member function exists() on null
-
Fatal error: Uncaught Error: Call to a member function exists() on null in /Users/fabrizioguespe/Developer/fastway/wp-includes/user.php:1371 Stack trace: #0 /Users/fabrizioguespe/Developer/fastway/wp-includes/pluggable.php(2569): clean_user_cache(NULL) #1 /Users/fabrizioguespe/Developer/fastway/wp-content/plugins/create-user-with-password-multisite/php/cuwp.php(132): wp_set_password('', NULL) #2 /Users/fabrizioguespe/Developer/fastway/wp-includes/class-wp-hook.php(287): CUWP_Create_User_With_Password->cuwp_listen('') #3 /Users/fabrizioguespe/Developer/fastway/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #4 /Users/fabrizioguespe/Developer/fastway/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #5 /Users/fabrizioguespe/Developer/fastway/wp-admin/admin.php(401): do_action('admin_action_cr...') #6 /Users/fabrizioguespe/Developer/fastway/wp-admin/user-new.php(10): require_once('/Users/fabrizio...') #7 {main} thrown in /Users/fabrizioguespe/Developer/fastway/wp-includes/user.php on line 1371
I get this error, i solved it with a simple validation in line 132 of cuwp.php in your plugin
Change:
wp_set_password(sanitize_text_field($_REQUEST[‘cuwp_pass1’]), $user->ID);
To: if($_REQUEST[‘cuwp_pass1’])wp_set_password(sanitize_text_field($_REQUEST[‘cuwp_pass1’]), $user->ID);This happens when creating user with checkbox disabled and empty passwords (being superadmin )
- The topic ‘Fatal error: Uncaught Error: Call to a member function exists() on null’ is closed to new replies.