0Task #002219: Compatibilit PHP 8.2 : Deprecated: Creation of dynamic property ...
This commit is contained in:
parent
768be7f377
commit
cde77ea72d
3 changed files with 12 additions and 2 deletions
|
|
@ -184,7 +184,7 @@ class Card_Property
|
|||
} else {
|
||||
// if there is a class base in fiche_def_ref, this account will be the
|
||||
// the default one
|
||||
if (strlen(trim($p_fiche_def->class_base)) != 0) {
|
||||
if (noalyss_strlen(noalyss_trim($p_fiche_def->class_base)) != 0) {
|
||||
$result['msg'] .= " <span style=\"color:red\">" . _("Rappel: Poste par défaut sera ") .
|
||||
$p_fiche_def->class_base .
|
||||
" !</span> ";
|
||||
|
|
|
|||
|
|
@ -1579,6 +1579,16 @@ function add_http_link($text)
|
|||
return $ret;
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// PHP 8.2 fails with these functions when a NULL is given as argument
|
||||
//
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function noalyss_strlen($p_string) :int{
|
||||
if (empty ($p_string) ) return 0;
|
||||
else return strlen($p_string);
|
||||
}
|
||||
function noalyss_trim($p_string) {
|
||||
if ($p_string===null) return "";
|
||||
else return trim($p_string);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class INum extends IText
|
|||
|
||||
$extra=(isset($this->extra))?$this->extra:"";
|
||||
|
||||
$this->value=str_replace('"', '', $this->value);
|
||||
$this->value=noalyss_str_replace('"', '', $this->value);
|
||||
$strAttribute=$this->get_node_attribute();
|
||||
if (!isset($this->css_size) || empty ($this->css_size))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue