From a57ee784928b8268a3fbf1e8319326dd7c4b6f22 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 4 Apr 2025 20:48:02 +1100 Subject: [PATCH] Ensure that Attribute::required() doesnt work with NULL $this->schema. Avoids issue as reported by #306 --- app/Classes/LDAP/Attribute.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Classes/LDAP/Attribute.php b/app/Classes/LDAP/Attribute.php index 73d35bf8..af398bc1 100644 --- a/app/Classes/LDAP/Attribute.php +++ b/app/Classes/LDAP/Attribute.php @@ -326,7 +326,7 @@ class Attribute implements \Countable, \ArrayAccess, \Iterator { // If we dont have any objectclasses then we cant know if it is required return $this->oc->count() - ? $this->oc->intersect($this->schema->required_by_object_classes->keys())->sort() + ? $this->oc->intersect($this->required_by->keys())->sort() : collect(); } } \ No newline at end of file