Skip to:

#8882 closed defect (bug) (fixed)

Need to removed unused global variable.

Reported by: upadalavipul's profile upadalavipul Owned by: imath's profile imath
Milestone: 12.0.0 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch


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)

8882.patch (4.2 KB) - added by upadalavipul 14 months ago.

Download all attachments as: .zip

Change History (4)

14 months ago

#1 @imath
14 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 12.0.0

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.

This ticket was mentioned in PR #96 on buddypress/buddypress by @imath.

14 months ago

+ Remove global variable declarations when corresponding variables are not used in the code.
+ Do some extra code clean-up.

Trac ticket:

#3 @imath
14 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13469:

Remove global vars declarations when corresponding vars are not used

Props upadalavipul

Fixes #8882

Note: See TracTickets for help on using tickets.