Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 4 weeks ago

#7910 closed defect (bug) (invalid)

Errors being thrown from bp-groups

Reported by: groston's profile groston Owned by: espellcaste's profile espellcaste
Milestone: Priority: low
Severity: trivial Version: 2.9.3
Component: Groups Keywords: reporter-feedback needs-test-info
Cc:

Description

I found a number of error messages of the type:

PHP Notice: Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line xxx

in the site’s debug.log file. In each case, the object that does not exist is $group and the errors occurred when a new group was being created. Though I am a true PHP/WordPress novice, to me, this feels like a bug. It seems that the routines in which these lines of code exist expect to get a group data object from the database, i.e., an existing group, but before the group is stored to the database, the object is empty.

If this notion is correct, this bug should be fixed.

Change History (8)

#1 @r-a-y
8 years ago

  • Keywords reporter-feedback added

@groston - Thanks for the report.

It would help if you also provided the line numbers and provided us with a list of steps to duplicate so we can determine the cause of these notices.

#2 @groston
8 years ago

r-a-y: My apologies, should have provided more details.

The warnings are thrown when a new group is created. I just created a group on our test site and found the following in debug.log:

[12-Jul-2018 20:00:54 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 1118
[12-Jul-2018 20:00:54 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 654
[12-Jul-2018 20:00:54 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 792
[12-Jul-2018 20:00:54 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 797
[12-Jul-2018 20:00:54 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/themes/social-portfolio/buddyboss-inc/theme-functions.php on line 1627
[12-Jul-2018 20:00:54 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 1157
[12-Jul-2018 20:00:54 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress-group-email-subscription/screen.php on line 19
[12-Jul-2018 20:00:54 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 2580
[12-Jul-2018 20:01:07 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 1118
[12-Jul-2018 20:01:07 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 654
[12-Jul-2018 20:01:07 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 792
[12-Jul-2018 20:01:07 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 797
[12-Jul-2018 20:01:07 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/themes/social-portfolio/buddyboss-inc/theme-functions.php on line 1627
[12-Jul-2018 20:01:07 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 1157
[12-Jul-2018 20:01:07 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress-group-email-subscription/screen.php on line 19
[12-Jul-2018 20:01:07 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 2580
[12-Jul-2018 20:01:14 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 1118
[12-Jul-2018 20:01:14 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 654
[12-Jul-2018 20:01:14 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 792
[12-Jul-2018 20:01:14 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 797
[12-Jul-2018 20:01:14 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/themes/social-portfolio/buddyboss-inc/theme-functions.php on line 1627
[12-Jul-2018 20:01:14 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 1157
[12-Jul-2018 20:01:14 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress-group-email-subscription/screen.php on line 19
[12-Jul-2018 20:01:14 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 2580
[12-Jul-2018 20:01:19 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 1118
[12-Jul-2018 20:01:19 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 654
[12-Jul-2018 20:01:19 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 792
[12-Jul-2018 20:01:19 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 797
[12-Jul-2018 20:01:19 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/themes/social-portfolio/buddyboss-inc/theme-functions.php on line 1627
[12-Jul-2018 20:01:19 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 1157
[12-Jul-2018 20:01:19 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress-group-email-subscription/screen.php on line 19
[12-Jul-2018 20:01:19 UTC] PHP Notice:  Trying to get property of non-object in /var/www/html/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 2580

#3 @DJPaul
7 years ago

  • Milestone changed from Awaiting Review to Under Consideration

#4 @DJPaul
7 years ago

  • Milestone changed from Under Consideration to Awaiting Contributions

#5 @sourabh.matolia
10 months ago

  • Keywords needs-testing-info added

Hello,

Based on the details provided above.
Issue is not replicable anymore.

When we create a group using the latest BuddyPress version, no error/notice gets triggered.
I ran a test on PHP 8.2, the latest version of BuddyPress, and WordPress.
We can close the issue.

Thanks

Last edited 10 months ago by sourabh.matolia (previous) (diff)

#6 @espellcaste
10 months ago

  • Milestone changed from Awaiting Contributions to Awaiting Review
  • Owner set to espellcaste
  • Status changed from new to assigned

#7 @wordpressdotorg
9 months ago

  • Keywords needs-test-info added; needs-testing-info removed

#8 @espellcaste
4 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.