Opened 18 months ago
Closed 18 months ago
#8882 closed defect (bug) (fixed)
Need to removed unused global variable.
Reported by: | upadalavipul | Owned by: | imath |
---|---|---|---|
Milestone: | 12.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
I have reviewed the BuddyPress code and found that some of the files in unused global variables define and it's not used anywhere. Please check the below files.
Files list:
- src/bp-core/admin/bp-core-admin-functions.php
- src/bp-core/classes/class-bp-optouts-list-table.php
- src/bp-groups/classes/class-bp-groups-group.php
- src/bp-groups/classes/class-bp-groups-member.php
- src/bp-members/classes/class-bp-members-invitations-list-table.php
- src/bp-members/classes/class-bp-signup.php
- src/bp-templates/bp-nouveau/includes/groups/classes.php
- src/bp-xprofile/classes/class-bp-xprofile-field.php
Attachments (1)
Change History (4)
This ticket was mentioned in PR #96 on buddypress/buddypress by @imath.
18 months ago
#2
+ Remove global variable declarations when corresponding variables are not used in the code.
+ Do some extra code clean-up.
Trac ticket: https://buddypress.trac.wordpress.org/ticket/8882
Note: See
TracTickets for help on using
tickets.
Hi @upadalavipul
Thanks a lot for your report and patch. Good catch !! I’ll give it another look but I totally agree, we shouldn’t declare these globals if we don’t use it.