@@ -267,7 +267,7 @@ public function renderBody(): string
267267 if ($ text instanceof IHtmlString) {
268268 $ s .= $ this ->getWrapper ('group label ' )->addHtml ($ text );
269269
270- } elseif (is_string ( $ text)) {
270+ } elseif ($ text != NULL ) { // intentionally ==
271271 if ($ translator !== NULL ) {
272272 $ text = $ translator ->translate ($ text );
273273 }
@@ -278,7 +278,7 @@ public function renderBody(): string
278278 if ($ text instanceof IHtmlString) {
279279 $ s .= $ text ;
280280
281- } elseif (is_string ( $ text)) {
281+ } elseif ($ text != NULL ) { // intentionally ==
282282 if ($ translator !== NULL ) {
283283 $ text = $ translator ->translate ($ text );
284284 }
@@ -378,7 +378,7 @@ public function renderPairMulti(array $controls): string
378378 if ($ description instanceof IHtmlString) {
379379 $ description = ' ' . $ description ;
380380
381- } elseif (is_string ( $ description)) {
381+ } elseif ($ description != NULL ) { // intentionally ==
382382 if ($ control instanceof Nette \Forms \Controls \BaseControl) {
383383 $ description = $ control ->translate ($ description );
384384 }
@@ -435,7 +435,7 @@ public function renderControl(Nette\Forms\IControl $control): Html
435435 if ($ description instanceof IHtmlString) {
436436 $ description = ' ' . $ description ;
437437
438- } elseif (is_string ( $ description)) {
438+ } elseif ($ description != NULL ) { // intentionally ==
439439 if ($ control instanceof Nette \Forms \Controls \BaseControl) {
440440 $ description = $ control ->translate ($ description );
441441 }
0 commit comments