Skip to content

Commit edf6c27

Browse files
committed
TemplateFactory: does not assign the default property to the template if it does not match the type [Closes #352]
1 parent 8f56703 commit edf6c27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Bridges/ApplicationLatte/TemplateFactory.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ public function createTemplate(?UI\Control $control = null, ?string $class = nul
7777

7878
foreach ($params as $key => $value) {
7979
if ($value !== null && property_exists($template, $key)) {
80-
$template->$key = $value;
80+
try {
81+
$template->$key = $value;
82+
} catch (\TypeError) {
83+
}
8184
}
8285
}
8386

0 commit comments

Comments
 (0)