mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-22 00:32:16 +02:00
N°4517 - PHP 8.1: Fix deprecated notice for null value passed to string parameter of native PHP functions
This commit is contained in:
@@ -298,7 +298,7 @@ EOF
|
|||||||
$sHTMLValue .= "<input class=\"field_autocomplete ibo-input ibo-input-select ibo-input-select-autocomplete\" type=\"text\" id=\"label_$this->iId\" value=\"$sDisplayValue\" placeholder='...'/>";
|
$sHTMLValue .= "<input class=\"field_autocomplete ibo-input ibo-input-select ibo-input-select-autocomplete\" type=\"text\" id=\"label_$this->iId\" value=\"$sDisplayValue\" placeholder='...'/>";
|
||||||
|
|
||||||
// another hidden input to store & pass the object's Id
|
// another hidden input to store & pass the object's Id
|
||||||
$sHTMLValue .= "<input type=\"hidden\" id=\"$this->iId\" name=\"{$sAttrFieldPrefix}{$sFieldName}\" value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\" />\n";
|
$sHTMLValue .= "<input type=\"hidden\" id=\"$this->iId\" name=\"{$sAttrFieldPrefix}{$sFieldName}\" value=\"".utils::HtmlEntities($value)."\" />\n";
|
||||||
|
|
||||||
$JSSearchMode = $this->bSearchMode ? 'true' : 'false';
|
$JSSearchMode = $this->bSearchMode ? 'true' : 'false';
|
||||||
// Scripts to start the autocomplete and bind some events to it
|
// Scripts to start the autocomplete and bind some events to it
|
||||||
|
|||||||
@@ -1827,7 +1827,7 @@ class utils
|
|||||||
*/
|
*/
|
||||||
public static function HtmlEntities($sValue)
|
public static function HtmlEntities($sValue)
|
||||||
{
|
{
|
||||||
return htmlentities($sValue, ENT_QUOTES, 'UTF-8');
|
return htmlentities($sValue ?? '', ENT_QUOTES, 'UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ class ormStopWatch
|
|||||||
foreach ($aProperties as $sProperty => $sValue)
|
foreach ($aProperties as $sProperty => $sValue)
|
||||||
{
|
{
|
||||||
$sRes .= "<TR>";
|
$sRes .= "<TR>";
|
||||||
$sCell = str_replace("\n", "<br>\n", $sValue);
|
$sCell = str_replace("\n", "<br>\n", $sValue ?? '');
|
||||||
$sRes .= "<TD class=\"label\">$sProperty</TD><TD>$sCell</TD>";
|
$sRes .= "<TD class=\"label\">$sProperty</TD><TD>$sCell</TD>";
|
||||||
$sRes .= "</TR>";
|
$sRes .= "</TR>";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user