Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/16/2025 04:29:43 PM (5 months ago)
Author:
espellcaste
Message:

Code Modernization: address the only, so far, two issues related to PHP 8.5.

  • Instances of using null as an array offset.
  • ArrayIterator::__construct(): Using an object as a backing array for ArrayIterator is deprecated.

Reference: https://wiki.php.net/rfc/deprecations_php_8_5\#deprecate_arrayobject_and_arrayiterator_with_objects

Follow-up to [14147].

Props espellcaste.

Closes https://github.com/buddypress/buddypress/pull/425
Fixes #9313 (14.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/14.0/src/bp-core/bp-core-template-loader.php

    r13903 r14150  
    594594            $url_query_chunks = bp_parse_args( $GLOBALS['wp']->query_string, array() );
    595595            $directory        = key( $url_query_chunks );
    596             if ( isset( $bp_directories[ $directory ] ) ) {
     596            if ( isset( $directory, $bp_directories[ $directory ] ) ) {
    597597                $url_query_chunks[ $directory ] = $bp_directories[ $directory ];
    598598            }
Note: See TracChangeset for help on using the changeset viewer.