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.

Comments

davidcsonka’s picture

Not sure if this is a problem with the default branch or a customized version.

Here is a potential fix if relevant to Alpha5

davidcsonka’s picture

Patch file -

draenen’s picture

Status: Active » Needs work

This 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.

if (empty($values->{$this->field_alias}) {
  return FALSE;
}
draenen’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.x-dev
Status: Needs work » Fixed

So 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.

  • draenen committed fb89fc8 on 7.x-1.x
    Issue #2350299 by davidcsonka, draenen: Fixed PHP warnings on admin/...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.