Skip to:
Content

BuddyPress.org

Changeset 10979


Ignore:
Timestamp:
08/02/2016 05:14:26 AM (8 years ago)
Author:
r-a-y
Message:

Core: Fix 404 errors on single BuddyPress pages when HHVM is in use.

Debugging on a HHVM install revealed a bug with our create nav link
functions during the implementation of the new navigation API. We
shouldn't be returning the nav API methods in the nav link functions; we
should be returning the nav array item instead.

See #6534.

Fixes #7197 (2.6-branch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/bp-core/bp-core-buddybar.php

    r10876 r10979  
    153153
    154154    // Add the item to the nav.
    155     $retval = buddypress()->{$component}->nav->add_nav( $nav_item );
     155    buddypress()->{$component}->nav->add_nav( $nav_item );
    156156
    157157    /**
     
    168168    do_action( 'bp_core_create_nav_link', $r, $args, $defaults, $component );
    169169
    170     return $retval;
     170    return $nav_item;
    171171}
    172172
     
    537537    );
    538538
    539     return buddypress()->{$component}->nav->add_nav( $subnav_item );
     539    buddypress()->{$component}->nav->add_nav( $subnav_item );
     540
     541    return $subnav_item;
    540542}
    541543
Note: See TracChangeset for help on using the changeset viewer.