Here -> /admin/memberships
Logged in as user 1.
Warning: array_flip(): Can only flip STRING and INTEGER values! in array_flip() (line 219 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/entity/includes/entity.controller.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in array_flip() (line 350 of /hdd/websites/mbcad7profile/includes/entity.inc).
Notice: Trying to get property of non-object in render() (line 51 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/membership_entity/modules/membership_entity_term/views/views_handler_field_membership_term_datetime.inc).
Warning: DateTime::getTimezone(): The DateTime object has not been correctly initialized by its constructor in getTimezone() (line 283 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in format() (line 384 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in format() (line 384 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in format() (line 384 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in format() (line 384 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in format() (line 384 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in format() (line 384 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in format() (line 384 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::setTimezone(): The DateTime object has not been correctly initialized by its constructor in setTimezone() (line 358 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::setDate(): The DateTime object has not been correctly initialized by its constructor in setDate() (line 359 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::setTime(): The DateTime object has not been correctly initialized by its constructor in setTime() (line 360 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in format() (line 384 of /hdd/websites/mbcad7profile/sites/all/modules/contrib/date/date_api/date_api.module).
---
This problem seems to manifest when one of the rows in that Views table is missing one of the term dates, in my case the user is missing a term end date because they are in Pending Status.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | membership_entity_term-fixing-php-warnings-2350299-1.patch | 1.15 KB | davidcsonka |
Comments
Comment #1
davidcsonka commentedNot sure if this is a problem with the default branch or a customized version.
Here is a potential fix if relevant to Alpha5
Comment #2
davidcsonka commentedPatch file -
Comment #3
draenen commentedThis field handler needs to work with any datetime field on any view which means we can't hard code field aliases (eg. membership_entity_term_membership_entity_end)
I think the following should work.
Comment #4
draenen commentedSo actually the issue here was that $mid was empty and we were passing a NULL type to membership_entity_get_bundle_settings(). Wrapping everything in if ($mid) seems to be the best solution.
Fix committed to 7.x-1.x.