Skip to:
Content

bbPress.org

Changeset 5640


Ignore:
Timestamp:
03/17/2015 12:30:01 AM (6 years ago)
Author:
netweb
Message:

Use preg_replace over incorrect ltrim usage in bbp_get_do_not_reply_address() causing undeliverable or invalid subscription emails in certain situations because the "from" address was incorrect.

Props DJPaul. See #2618 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r5637 r5640  
    10121012 */
    10131013function bbp_get_do_not_reply_address() {
    1014     $email = 'noreply@' . str_replace( 'www.', '', ltrim( get_home_url(), '^(http|https)://' ) );
     1014    $email = 'noreply@' . preg_replace( '@^https?://(www\.)?@i', '', get_home_url() );
    10151015    return apply_filters( 'bbp_get_do_not_reply_address', $email );
    10161016}
Note: See TracChangeset for help on using the changeset viewer.