Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/02/2023 02:05:08 AM (3 years ago)
Author:
imath
Message:

Prevent potential issues with late_includes() in Component classes

Use require_once instead of require to load action & screen files.

See #4954
Fixes #8910
Closes https://github.com/buddypress/buddypress/pull/112

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-friends/classes/class-bp-friends-component.php

    r13481 r13495  
    8686                                in_array( bp_current_action(), array( 'add-friend', 'remove-friend' ), true )
    8787                        ) {
    88                                 require $this->path . 'bp-friends/actions/' . bp_current_action() . '.php';
     88                                require_once $this->path . 'bp-friends/actions/' . bp_current_action() . '.php';
    8989                        }
    9090
    9191                        // User nav.
    92                         require $this->path . 'bp-friends/screens/my-friends.php';
     92                        require_once $this->path . 'bp-friends/screens/my-friends.php';
    9393                        if ( is_user_logged_in() && bp_is_user_friend_requests() ) {
    94                                 require $this->path . 'bp-friends/screens/requests.php';
     94                                require_once $this->path . 'bp-friends/screens/requests.php';
    9595                        }
    9696                }
Note: See TracChangeset for help on using the changeset viewer.