Skip to content

Commit 25282d9

Browse files
committed
wip
1 parent d3565ca commit 25282d9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Forms/Controls/BaseControl.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,15 @@ public function getLabel(string|Stringable|null $caption = null)
257257

258258
public function getControlPart(): ?Html
259259
{
260-
return $this->getControl();
260+
$control = $this->getControl();
261+
return $control instanceof Html ? $control : null;
261262
}
262263

263264

264265
public function getLabelPart(): ?Html
265266
{
266-
return $this->getLabel();
267+
$label = $this->getLabel();
268+
return $label instanceof Html ? $label : null;
267269
}
268270

269271

0 commit comments

Comments
 (0)