buddypress/tests/phpunit/testcases
r-a-y 798ad1fd47 Caps: Fix issue with passing an empty array as an argument in bp_current_user_can().
Changes to `bp_current_user_can()` in #6501 broke older capability checks
relying on an empty argument to be passed in order to use a fallback value.

Most notably, `bp_current_user_can('bp_xprofile_change_field_visibility' )`
checks now passed by default.  This resulted in the "Change" link to
always be visible when editing a profile field even if an admin has enabled
"Enforce field visibility" for that particular field.

This commit fixes this issue by passing a `null` value if there are no
extra arguments to pass in `bp_current_user_can()`.  Commit also includes
a unit test.

See #6730 (2.4-branch).

git-svn-id: https://buddypress.svn.wordpress.org/branches/2.4@10376 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2015-11-25 19:23:55 +00:00
..
activity Introduce fields parameter to bp_has_activities() stack. 2015-10-08 16:59:40 +00:00
admin bp_core_get_directory_page_ids() should skip bp_is_active() check in save context. 2015-03-10 15:23:36 +00:00
blogs Blogs: Record activity item for blog post if it doesn't exist when a post comment is posted. 2015-10-14 16:37:30 +00:00
core Caps: Fix issue with passing an empty array as an argument in bp_current_user_can(). 2015-11-25 19:23:55 +00:00
friends Fix SQL syntax error in BP_Friends_Friendship::search_friends(). 2015-07-02 12:54:28 +00:00
groups Groups: new function to get groups from which a user is banned. 2015-10-10 13:07:23 +00:00
members Allow xProfile fields to be restricted to users belonging to one or more member types. 2015-07-21 14:00:38 +00:00
messages Messages: Return context-appropriate error messages for messages_new_message(). 2015-10-19 19:47:01 +00:00
notifications Notifications: Tests for all_for_user cache deletion. 2015-05-21 20:05:12 +00:00
routing URI: Allow root profiles to work when the 'Members' page is nested. 2015-10-08 04:52:31 +00:00
settings Improve sanitization of email notification settings. 2015-11-11 03:22:53 +00:00
xprofile Merge similar translation strings throughout BuddyPress. 2015-10-14 16:03:03 +00:00