Opened 10 years ago
Closed 10 years ago
#5983 closed defect (bug) (fixed)
groups can be created with creator_id = 0
Reported by: | DJPaul | Owned by: | djpaul |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Groups | Keywords: | |
Cc: |
Description
groups_create_group
will accept a creator_id
of 0
. This causes problems in places where BuddyPress expects the creator_id
to be set to a valid user (i.e. everywhere).
This was observed in the wild in a unit test, test_total_group_count_groups_accept_membership_request
, which recently started failing when tested against WordPress core trunk. I have been unable to identify the commits in WP and BP which caused the test to fail.
https://travis-ci.org/buddypress/BuddyPress/jobs/39704710
There was 1 error: 1) BP_Tests_Groups_Functions::test_total_group_count_groups_accept_membership_request Trying to get property of non-object /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-groups/bp-groups-notifications.php:115 /tmp/wordpress/src/wp-content/plugins/BuddyPress/src/bp-groups/bp-groups-functions.php:1221 /tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/groups/functions.php:107 /home/travis/.phpenv/versions/5.2.17/bin/phpunit:46 FAILURES! Tests: 666, Assertions: 1101, Errors: 1, Skipped: 9.
Change History (4)
Note: See
TracTickets for help on using
tickets.
In 9117: