charlie_c
Member
Posted 17 years ago #
Warning: in_array(): Wrong datatype for second argument in /home/fhlinux183/domain.co.uk/user/htdocs/wp-includes/wpmu-functions.php on line 881
I have tried changing the second argument to other array, but still same error.
Is this correct -
if( in_array( $email_domain, $banned_names ) == true ) {
$errors->add('user_email', __("You cannot use that email address to signup. Please use another provider."));
Charlie, there's a bug fix for this over on trac. Looks like it's also been discussed a few times recently here in the forums.
This is how I got it up and running (this adds a handler for the banned_email_domains preference - otherwise it doesn't get set):
$ svn diff
Index: wp-admin/wpmu-edit.php
===================================================================
--- wp-admin/wpmu-edit.php (revision 721)
+++ wp-admin/wpmu-edit.php (working copy)
@@ -21,6 +21,11 @@
} else {
update_site_option( "limited_email_domains", '' );
}
+ if( $_POST[ 'banned_email_domains' ] != '' ) {
+ update_site_option( "banned_email_domains", split( ' ', $_POST[ 'banned_email_domains' ] ) );
+ } else {
+ update_site_option( "banned_email_domains", '' );
+ }
update_site_option( "menu_items", $_POST[ 'menu_items' ] );
update_site_option( "blog_upload_space", $_POST[ 'blog_upload_space' ] );
update_site_option( "upload_filetypes", $_POST[ 'upload_filetypes' ] );
charlie_c
Member
Posted 17 years ago #
Thanks for the replies I did search for about an hour but obviously I was searching for the wrong thing.
Managed to get it working now, but have to do a reinstall cos my webspace provider wont allow me to use subdomains.