Fix type hinting

This commit is contained in:
Eric
2020-09-29 09:23:13 +02:00
parent 794ee89d12
commit 2b0bdda1e0

View File

@@ -116,10 +116,12 @@ class RenderingOutput
*
* @return \Combodo\iTop\Renderer\RenderingOutput
*/
public function AddHtml(string $sHtml, bool $bEncodeHtmlEntities = false)
public function AddHtml(?string $sHtml, bool $bEncodeHtmlEntities = false)
{
$this->sHtml .= ($bEncodeHtmlEntities) ? htmlentities($sHtml, ENT_QUOTES, 'UTF-8') : $sHtml;
if (!is_null($sHtml)) {
$this->sHtml .= ($bEncodeHtmlEntities) ? htmlentities($sHtml, ENT_QUOTES, 'UTF-8') : $sHtml;
}
return $this;
}