Update emhttp/plugins/dynamix/include/publish.php

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Squidly271
2025-08-10 22:37:30 -04:00
committed by GitHub
parent fb98b20982
commit 4612e00065

View File

@@ -136,7 +136,8 @@ function publish_md5($endpoint, $message, $opt1=1, $opt2=false, $opt3=120) {
}
}
$md5_new = $message ? md5($message,true) : -1 ;
// Always hash the payload to avoid collapsing distinct "falsey" values
$md5_new = md5((string)$message, true);
if ($md5_new !== ($md5_old[$endpoint]??null)) {
$md5_old[$endpoint] = $md5_new;
$md5_time[$endpoint] = time();