#8015 closed defect (bug) (fixed)
personal data exporter error
Reported by: | Venutius | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.1.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Members | Keywords: | |
Cc: |
Description
I was testing the export of personal data and I got the following errors while WordPress was compiling the results:
[30-Nov-2018 10:25:56 UTC] PHP Notice: Trying to get property 'id' of non-object in wp-content/plugins/buddypress/bp-notifications/bp-notifications-functions.php on line 853
[30-Nov-2018 10:25:56 UTC] PHP Notice: Undefined variable: notification_item in /wp-content/plugins/buddypress/bp-notifications/bp-notifications-functions.php on line 853
[30-Nov-2018 10:25:56 UTC] PHP Notice: Undefined property: stdClass::$total_count in /wp-content/plugins/buddypress/bp-notifications/bp-notifications-functions.php on line 849
Changing $notification-item to $notification clears the first two of these errors but it looks like total_count is not a valid property for the $notification array.
Change History (5)
#3
@
6 years ago
- Component changed from Core to Members
- Milestone changed from Awaiting Review to 4.1.0
Thank you for the report. notification_item
was a copy-paste error.
total_count
only exists when fetching grouped notifications, which we're not doing in this context. See https://buddypress.trac.wordpress.org/browser/tags/4.0.0/src/bp-notifications/classes/class-bp-notifications-notification.php?marks=1156#L1149
But because we're using the same 'bp_notifications_get_notifications_for_user' filter, we need to pass *something* in this spot. I'm going to change it to null
.
In 12305: