We encountered an issue in our site when (re-)importing users from AD via the feeds module and an LDAP query (this is all working perfectly)

php: Error: Class name must be a valid object or a string in entity_get_controller()

I found that an entity_load on NULL was being executed in the LdapAuthorizationConsumerOG class, populateConsumersFromConsumerIds method. For now we can't figure out where this NULL entity is coming from but I added a simple check to pass any non-existing entities: see the attached patch.

I hope this at least helps someone having similar issues, or perhaps commit it to core LDAP (after review etc) so this edge-case is caught.

CommentFileSizeAuthor
ldap-entity-null-check.patch962 byteswannesdr

Comments

Wannes DR created an issue. See original summary.

grahl’s picture

Status: Active » Needs review

  • grahl committed 3737b9e on 7.x-2.x authored by Wannes DR
    Issue #3107685 by Wannes DR: Entity type of NULL in authorization OG
    
grahl’s picture

Status: Needs review » Fixed

Fix doesn't seem to have side-effects, so let's add it. Thanks!

Status: Fixed » Closed (fixed)

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