Skip to content

Conversation

@simonLeary42
Copy link
Collaborator

@simonLeary42 simonLeary42 commented Apr 23, 2025

While writing tests for disbanding and recreating PI groups, I found that an LDAPEntry still thinks it exists after being deleted. This is because $this->object is not set back to null in pullObject.

rewrote pullObject:

  • set $this->object to null if ldap_read or ldap_get_entries return false
  • removed comment about "LDAP count element" because it's removed with LDAP::stripCount
  • renamed $search to $entries
  • replaced check for isset($entries) with $entries === false
  • replaced die() with throw new Exception
  • returned true on success

@simonLeary42 simonLeary42 requested a review from bryank-cs April 23, 2025 15:50
@simonLeary42 simonLeary42 changed the title make sure $this->object = null after delete() and pullObject() rewrite pullObject Apr 24, 2025
@simonLeary42 simonLeary42 merged commit e34df02 into main Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants