Skip to:
Content

BuddyPress.org

Changeset 13649


Ignore:
Timestamp:
11/23/2023 04:08:04 AM (20 months ago)
Author:
imath
Message:

Avoid a PHP warning in bp_core_current_user_ip()

Props slaFFik

Fixes #9028
See #9002
Closes https://github.com/buddypress/buddypress/pull/195

Location:
trunk/src/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-moderation.php

    r13370 r13649  
    331331 */
    332332function bp_core_current_user_ip() {
    333     $retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
     333    $retval = '';
     334    if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
     335        $retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', wp_unslash( $_SERVER['REMOTE_ADDR'] ) );
     336    }
    334337
    335338    /**
  • trunk/src/bp-core/classes/class-bp-admin.php

    r13643 r13649  
    824824                        </h2>
    825825                        <p>
    826                             <?php esc_html_e( 'Among the 90 changes introduced in 12.0.0, the BP Rewrites API is a massive revolution opening the way for a progressive BuddyPress evolution.', 'buddypress' ); ?>
     826                            <?php esc_html_e( 'Among the 100 changes introduced in 12.0.0, the BP Rewrites API is a massive revolution opening the way for a progressive BuddyPress evolution.', 'buddypress' ); ?>
    827827                            <?php esc_html_e( 'Based on 10 years of experience gained through hard work, we are beginning to reimagine what it means to organize and manage communities within WordPess.', 'buddypress' ); ?>
    828828                            <?php esc_html_e( 'Here are the immediate benefits of the new BP Rewrites API :', 'buddypress' ); ?>
     
    943943                        printf(
    944944                            /* translators: 1: heart dashicons. 2: BP Credits screen url. 3: number of BuddyPress contributors to this version. */
    945                             _n( 'Built with %1$s by <a href="%2$s">%3$d volunteer</a>.', 'Built with %1$s by <a href="%2$s">%3$d volunteers</a>.', 31, 'buddypress' ),
     945                            _n( 'Built with %1$s by <a href="%2$s">%3$d volunteer</a>.', 'Built with %1$s by <a href="%2$s">%3$d volunteers</a>.', 32, 'buddypress' ),
    946946                            '<span class="dashicons dashicons-heart"></span>',
    947947                            esc_url( bp_get_admin_url( 'admin.php?page=bp-credits' ) ),
    948                             number_format_i18n( 31 )
     948                            number_format_i18n( 32 )
    949949                        );
    950950                        ?>
     
    10661066                </li>
    10671067                <li class="wp-person" id="wp-person-slaffik">
    1068                     <a class="web" href="https://profiles.wordpress.org/r-a-y/"><img alt="" class="gravatar" src="//www.gravatar.com/avatar/61fb07ede3247b63f19015f200b3eb2c?s=120">
     1068                    <a class="web" href="https://profiles.wordpress.org/slaffik/"><img alt="" class="gravatar" src="//www.gravatar.com/avatar/61fb07ede3247b63f19015f200b3eb2c?s=120">
    10691069                    Slava Abakumov</a>
    10701070                    <span class="title"><?php esc_html_e( 'Core Developer', 'buddypress' ); ?></span>
     
    11671167                <a href="https://profiles.wordpress.org/shailu25/">Shail Mehta (shailu25)</a>,
    11681168                <a href="https://profiles.wordpress.org/shawfactor/">shawfactor</a>,
     1169                <a href="https://profiles.wordpress.org/slaffik/">Slava Abakumov (slaFFik)</a>,
    11691170                <a href="https://profiles.wordpress.org/sjregan/">sjregan</a>,
    11701171                <a href="https://profiles.wordpress.org/teeboy4real/">teeboy4real</a>,
Note: See TracChangeset for help on using the changeset viewer.