Making WordPress.org


Ignore:
Timestamp:
10/12/2020 04:25:02 AM (5 years ago)
Author:
dd32
Message:

BuddyPress.org Redirects: Handle edge-cases where required positional arguements are not set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/buddypress.org/public_html/wp-content/plugins/buddypress-org/extensions.php

    r10335 r10361  
    109109
    110110    // Redirect old plugin groups to deprecated plugin forums
    111     if ( ( $uri_chunks[1] === 'community' ) && ( $uri_chunks[2] === 'groups' ) ) {
     111    if ( ( $uri_chunks[1] === 'community' ) && isset( $uri_chunks[2] ) && ( $uri_chunks[2] === 'groups' ) ) {
    112112
    113113        // /community/groups/ to Support root.
     
    116116
    117117        // Single group topic redirect
    118         } elseif ( !empty( $uri_chunks[5] ) && ( $uri_chunks[5] === 'topic' ) ) {
     118        } elseif ( !empty( $uri_chunks[5] ) && ( $uri_chunks[5] === 'topic' ) && !empty( $uri_chunks[6] ) ) {
    119119            bp_core_redirect( home_url( '/support/topic/' . $uri_chunks[6] . '/' ) );
    120120
Note: See TracChangeset for help on using the changeset viewer.