Skip to content

Commit 3fad977

Browse files
committed
When submitting an import form and validation fails, there is no DN returned, so dont update one.
1 parent b1d153a commit 3fad977

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/Http/Controllers/HomeController.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,12 @@ public function frame(Request $request,?Collection $old=NULL): \Illuminate\View\
376376
->with('bases',$this->bases());
377377

378378
// If we are rendering a DN, rebuild our object
379-
$o = config('server')->fetch($key['dn']);
379+
if ($key['dn']) {
380+
$o = config('server')->fetch($key['dn']);
380381

381-
foreach (collect(old())->except(['key','dn','step','_token','userpassword_hash']) as $attr => $value)
382-
$o->{$attr} = $value;
382+
foreach (collect(old())->except(['key','dn','step','_token','userpassword_hash']) as $attr => $value)
383+
$o->{$attr} = $value;
384+
}
383385

384386
return match ($key['cmd']) {
385387
'create' => $view

0 commit comments

Comments
 (0)