From d1847a475a46d09ceae7212e9213bbddbca60b80 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 2 Feb 2024 17:04:54 +0100 Subject: [PATCH 1/2] =?UTF-8?q?N=C2=B07213=20-=20PHP=208.1:=20Migrate=20re?= =?UTF-8?q?maining=20usages=20of=20md5()=20with=20null=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/attributedef.class.inc.php | 2 +- core/ormdocument.class.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index c30a8389be..9c99ac3d99 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -8542,7 +8542,7 @@ public function Fingerprint($value) $sFingerprint = ''; if ($value instanceOf ormDocument) { - $sFingerprint = md5($value->GetData()); + $sFingerprint = md5($value->GetData() ?? ''); } return $sFingerprint; diff --git a/core/ormdocument.class.inc.php b/core/ormdocument.class.inc.php index 2ee6dfd33e..4eb53ebde7 100644 --- a/core/ormdocument.class.inc.php +++ b/core/ormdocument.class.inc.php @@ -343,6 +343,6 @@ public static function DownloadDocument(WebPage $oPage, $sClass, $id, $sAttCode, */ public function GetSignature(): string { - return md5($this->GetData()); + return md5($this->GetData() ?? ''); } } From b31bfac74cd89f9cad40c0f8234e38506a85f1e7 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 12 Feb 2024 14:23:43 +0100 Subject: [PATCH 2/2] Update core/attributedef.class.inc.php --- core/attributedef.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 9c99ac3d99..cfaafad93c 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -8542,7 +8542,7 @@ public function Fingerprint($value) $sFingerprint = ''; if ($value instanceOf ormDocument) { - $sFingerprint = md5($value->GetData() ?? ''); + $sFingerprint = $value->GetSignature(); } return $sFingerprint;