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-notifications/classes/class-bp-notifications-component.php

    r13450 r13495  
    7878                // Actions.
    7979                if ( bp_is_post_request() ) {
    80                         require $this->path . 'bp-notifications/actions/bulk-manage.php';
     80                        require_once $this->path . 'bp-notifications/actions/bulk-manage.php';
    8181                } elseif ( bp_is_get_request() ) {
    82                         require $this->path . 'bp-notifications/actions/delete.php';
     82                        require_once $this->path . 'bp-notifications/actions/delete.php';
    8383                }
    8484
    8585                // Screens.
    86                 require $this->path . 'bp-notifications/screens/unread.php';
     86                require_once $this->path . 'bp-notifications/screens/unread.php';
    8787                if ( bp_is_current_action( 'read' ) ) {
    88                         require $this->path . 'bp-notifications/screens/read.php';
     88                        require_once $this->path . 'bp-notifications/screens/read.php';
    8989                }
    9090        }
Note: See TracChangeset for help on using the changeset viewer.