Skip to content

Commit 52840f3

Browse files
committed
Check for null DN
1 parent 4d89d21 commit 52840f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ public function getParentDn(string $dn = null): ?string
700700
*/
701701
public function newDn(string $dn = null): DistinguishedName
702702
{
703-
if (str_contains($dn, BaseBuilder::BASE_DN_PLACEHOLDER)) {
703+
if (! is_null($dn) && str_contains($dn, BaseBuilder::BASE_DN_PLACEHOLDER)) {
704704
$dn = $this->newQuery()->substituteBaseDn($dn);
705705
}
706706

0 commit comments

Comments
 (0)