Opened 3 years ago
Closed 3 years ago
#8619 closed defect (bug) (fixed)
Undefined variable when handle avatar crop
Reported by: | oztaser | Owned by: | imath |
---|---|---|---|
Milestone: | 10.1.0 | Priority: | normal |
Severity: | normal | Version: | 10.0.0 |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
I noticed this problem when I was doing a detailed review after BuddyPress 10 release.
There is no variable called $r
in bp_members_screen_change_avatar()
function. It should be $args
. Commit https://buddypress.trac.wordpress.org/changeset/13177/trunk/src/bp-members/screens/change-avatar.php
I don't see any problem with in Legacy and Nouveau template pack. We can fix this in 10.1 if I don't missing something important.
Change History (7)
#2
@
3 years ago
- Keywords has-patch added
- Version set to 10.0.0
Good catch and thanks for finding this early!
No problemo, we'll fix this asap.
#3
@
3 years ago
I've found an another undefined variable usage in bp_nouveau_ajax_post_update()
function. I think $group_id
should be $item_id
.
diff --git a/src/bp-templates/bp-nouveau/includes/activity/ajax.php b/src/bp-templates/bp-nouveau/includes/activity/ajax.php index 0043e9d4c..6e81f3a88 100644 --- a/src/bp-templates/bp-nouveau/includes/activity/ajax.php +++ b/src/bp-templates/bp-nouveau/includes/activity/ajax.php @@ -552,7 +552,7 @@ function bp_nouveau_ajax_post_update() { if ( ! empty( $bp->groups->current_group->status ) ) { $status = $bp->groups->current_group->status; } else { - $group = groups_get_group( array( 'group_id' => $group_id ) ); + $group = groups_get_group( array( 'group_id' => $item_id ) ); $status = $group->status; }
BTW I wish I had seen this problem sooner but I was testing new release as an end user. I noticed the problem when I was doing full code review for production release.
Patch: