Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/28/2016 10:33:55 PM (3 years ago)
Author:
djpaul
Message:

Fix incorrect remove_action and remove_filter usage for WordPress 4.7.

remove_action and remove_filter formally accepted a fourth parameter until WP 4.7; it's only with the introduction of the WP_Hook class that the function signature changed. Prior to WP 4.7, the fourth parameter was unused, so it does no harm to remove it and tidy things up.

Fixes #7318

Props ketuchetan

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/caps.php

    r11052 r11256  
    1919        $can  = bp_current_user_can( 'foo', bp_get_root_blog_id() );
    2020        $cant = bp_current_user_can( 'foo', $b );
    21         remove_filter( 'user_has_cap', array( $this, 'grant_cap_foo' ), 10, 2 );
     21        remove_filter( 'user_has_cap', array( $this, 'grant_cap_foo' ), 10 );
    2222
    2323        $this->assertTrue( $can );
     
    4141        $can  = bp_current_user_can( 'foo', array( 'blog_id' => bp_get_root_blog_id() ) );
    4242        $cant = bp_current_user_can( 'foo', array( 'blog_id' => $b ) );
    43         remove_filter( 'user_has_cap', array( $this, 'grant_cap_foo' ), 10, 2 );
     43        remove_filter( 'user_has_cap', array( $this, 'grant_cap_foo' ), 10 );
    4444
    4545        $this->assertTrue( $can );
Note: See TracChangeset for help on using the changeset viewer.