From 33806070fa3406bf005752f253d9820d2c85f468 Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Wed, 13 Nov 2024 17:07:18 -0500 Subject: [PATCH] Don't match on models that do not have a distinguished name --- src/Models/Model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Models/Model.php b/src/Models/Model.php index 1cfad585..4e37a847 100644 --- a/src/Models/Model.php +++ b/src/Models/Model.php @@ -557,6 +557,8 @@ public function fresh(): static|false public function is(?Model $model = null): bool { return ! is_null($model) + && ! empty($this->dn) + && ! empty($model->getDn()) && $this->dn == $model->getDn() && $this->getConnectionName() == $model->getConnectionName(); }