Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/02/2023 02:05:08 AM (13 months 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-xprofile/classes/class-bp-xprofile-component.php

    r13450 r13495  
    112112        // User nav.
    113113        if ( bp_is_profile_component() ) {
    114             require $this->path . 'bp-xprofile/screens/public.php';
     114            require_once $this->path . 'bp-xprofile/screens/public.php';
    115115
    116116            // Sub-nav items.
    117117            if ( is_user_logged_in() && 'edit' === bp_current_action() ) {
    118                 require $this->path . 'bp-xprofile/screens/edit.php';
     118                require_once $this->path . 'bp-xprofile/screens/edit.php';
    119119            }
    120120        }
     
    122122        // Settings.
    123123        if ( is_user_logged_in() && bp_is_user_settings_profile() ) {
    124             require $this->path . 'bp-xprofile/screens/settings-profile.php';
     124            require_once $this->path . 'bp-xprofile/screens/settings-profile.php';
    125125        }
    126126    }
Note: See TracChangeset for help on using the changeset viewer.