From 911c6e322939971f010d73e8cd0703c3c21c389d Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 16 Feb 2025 13:45:22 +1100 Subject: [PATCH] Fix import, missing sprintf() and should use has() not contains() --- app/Ldap/Entry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Ldap/Entry.php b/app/Ldap/Entry.php index 06e3194..2bc9376 100644 --- a/app/Ldap/Entry.php +++ b/app/Ldap/Entry.php @@ -146,8 +146,8 @@ class Entry extends Model { $key = $this->normalizeAttributeKey($key); - if (! config('server')->schema('attributetypes')->contains($key)) - throw new AttributeException('Schema doesnt have attribute [%s]',$key); + if (! config('server')->schema('attributetypes')->has($key)) + throw new AttributeException(sprintf('Schema doesnt have attribute [%s]',$key)); if ($x=$this->objects->get($key)) { $x->addValue($value);