Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/16/2025 04:24:03 PM (7 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

Developed in https://github.com/buddypress/buddypress/pull/425

Follow-up to [14147].

Props espellcaste.

See #9313 (trunk)

File:
1 edited

Legend:

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

    r14013 r14149  
    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.