Ensure that Attribute::required() doesnt work with NULL $this->schema. Avoids issue as reported by #306
This commit is contained in:
parent
eab4f0427c
commit
a57ee78492
@ -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();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user