Skip to content

Commit a907c8b

Browse files
authored
Merge pull request #16 from repli2dev/fix-uninitialized-access
Fix uninitialized access
2 parents b70cc51 + f698116 commit a907c8b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Renderers/Bs3FormRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct()
4444

4545
public function render(Form $form, string $mode = null): string
4646
{
47-
if ($this->form !== $form) {
47+
if (!isset($this->form) || $this->form !== $form) {
4848
$this->controlsInit = false;
4949
}
5050

src/Renderers/Bs4FormRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(string $layout = FormLayout::HORIZONTAL)
6565

6666
public function render(Form $form, string $mode = null): string
6767
{
68-
if ($this->form !== $form) {
68+
if (!isset($this->form) || $this->form !== $form) {
6969
$this->controlsInit = false;
7070
}
7171

src/Renderers/Bs5FormRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function __construct(string $layout = FormLayout::HORIZONTAL)
6767

6868
public function render(Form $form, string $mode = null): string
6969
{
70-
if ($this->form !== $form) {
70+
if (!isset($this->form) || $this->form !== $form) {
7171
$this->controlsInit = false;
7272
}
7373

0 commit comments

Comments
 (0)