[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 16/32: 0Task #002219: Compatibilit PHP 8.2 :
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 16/32: 0Task #002219: Compatibilit PHP 8.2 : Deprecated: Creation of dynamic property ... |
Date: |
Thu, 5 Jan 2023 14:18:30 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit cde77ea72d30a5702df6064773fe9defbe9d2c42
Author: Dany wm DB <danydb@noalyss.eu>
AuthorDate: Tue Dec 20 21:38:33 2022 +0100
0Task #002219: Compatibilit PHP 8.2 : Deprecated: Creation of dynamic
property ...
---
include/class/card_property.class.php | 2 +-
include/lib/ac_common.php | 10 ++++++++++
include/lib/inum.class.php | 2 +-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/include/class/card_property.class.php
b/include/class/card_property.class.php
index 27132987e..b01dc73f6 100644
--- a/include/class/card_property.class.php
+++ b/include/class/card_property.class.php
@@ -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> ";
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index d4c594302..ad7629754 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -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);
diff --git a/include/lib/inum.class.php b/include/lib/inum.class.php
index 28a50825e..78923e206 100644
--- a/include/lib/inum.class.php
+++ b/include/lib/inum.class.php
@@ -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))
{
- [Noalyss-commit] [noalyss] 19/32: Improve ManageTable : add a ctl_pk_id as attribute in the row + doc, (continued)
- [Noalyss-commit] [noalyss] 19/32: Improve ManageTable : add a ctl_pk_id as attribute in the row + doc, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 18/32: Improve install config.inc.php file, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 15/32: Cosmetic add alert box, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 03/32: Cosmetic, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 06/32: Ergonomy : add button Close Cosmetic : color, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 08/32: Follow Up small bug with the #document_id, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 09/32: remove comment, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 29/32: Bug : ledger doesn't exist in 7.4 because the return value, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 26/32: Fix bug : for new TVA id not taken into account but auto-computed, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 25/32: Forgotten files, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 16/32: 0Task #002219: Compatibilit PHP 8.2 : Deprecated: Creation of dynamic property ...,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 17/32: add gitignore file, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 14/32: Administration : user show email, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 30/32: Function load : give the return type, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 05/32: Restore file, Dany De Bontridder, 2023/01/05
- [Noalyss-commit] [noalyss] 04/32: Cosmetic, Dany De Bontridder, 2023/01/05