buddypress/tests
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
..
phpunit Caps: Fix issue with passing an empty array as an argument in bp_current_user_can(). 2015-11-25 19:23:55 +00:00