The MU forums have moved to WordPress.org

Error on wp-signup.php (7 posts)

  1. Rubyducky
    Member
    Posted 17 years ago #

    Hey everyone,
    Whenever someone registers, this error appears at the top of the screen: Warning: strstr() [function.strstr]: Empty delimiter. in /opt/lampp/htdocs/wp-includes/wpmu-functions.php on line 815

    The users can still register and it works, but I was wondering what's wrong. Line 815 in wpmu-fuctions is:

    if( strstr( $email_domain, $banned_domain ) )

    Any help please? Thanks!

  2. lunabyte
    Member
    Posted 17 years ago #

    Hmmm, I haven't personally noticed it, but then on any of my internet accessible boxes I make sure errors aren't printed to the screen.

    What probably is happening is $banned_domain is empty, so the function can't check the email_domain (which is what the user is registering with) against an empty list.

    try adding this in front of strstr(

    !empty($banned_domain) &&

    so that you now have:

    if( !empty($banned_domain) && strstr( $email_domain, $banned_domain ) )

    This should keep it from generating and error, since the first check is to see if banned_domain is empty or not. If it is, it should move on because the first check would be false. Thus making it impossible for the second half to make the entire if statement true.

    I haven't tried this out yet, so let me know what happens.

  3. Rubyducky
    Member
    Posted 17 years ago #

    Yup it worked! I don't get the error anymore! Thanks a lot for your help!

  4. lunabyte
    Member
    Posted 17 years ago #

    Certainly.

  5. lunabyte
    Member
    Posted 17 years ago #

    What version of MU do you have?

    I'm looking at the 1.0 install I downloaded a couple weeks ago, and this shouldn't have been an issue because similar checks are already applied prior to execution of that check.

    The whole particular area looks like:


    $banned_names = get_site_option( "banned_email_domains" );
    if ( is_array( $banned_names ) && empty( $banned_names ) == false ) {
    $email_domain = strtolower( substr( $user_email, 1 + strpos( $user_email, '@' ) ) );
    foreach( $banned_names as $banned_domain ) {
    if( strstr( $email_domain, $banned_domain ) )
    $errors->add('user_email', __("You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider."));
    }
    }

  6. Rubyducky
    Member
    Posted 17 years ago #

    Yeah, I'm using 1.0

  7. lunabyte
    Member
    Posted 17 years ago #

    Strange.

    And that area is the same as I referenced, and still producing the error?

About this Topic

  • Started 17 years ago by Rubyducky
  • Latest reply from lunabyte