Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/08/2022 09:24:03 PM (21 months ago)
Author:
imath
Message:

Adapt to WP Cache API latest change about cache key requirements

In WordPress 6.1, a cache key needs to be an integer or a "not empty" string. See WP53818 changeset.

After analysing the failing PHPUnit failing tests, it seems we were not careful enough about cache key checks in a few cases:

  • When generating an activity comment without a corresponding parent activity in our tests.
  • When trying to cache a group membership ID for the group creator before this membership has been created.
  • When trying to check if a member had a member type or a group had a group type using an empty string although into 2 of our unit tests.

Fixes #8727

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/groups/types.php

    r12731 r13309  
    196196        bp_groups_register_group_type( 'foo' );
    197197
    198         $this->assertFalse( bp_groups_has_group_type( '', 'foo' ) );
     198        $this->assertFalse( bp_groups_has_group_type( 0, 'foo' ) );
    199199    }
    200200
Note: See TracChangeset for help on using the changeset viewer.