#8015 closed defect (bug) (fixed)
personal data exporter error
| Reported by: | Venutius | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1.0 |
| Component: | Members | Version: | |
| Severity: | normal | 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
@
8 years ago
- Component Core → Members
- Milestone Awaiting Review → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 12305: