From 206ff0470d5fad836bb37077bf86d42c21aa0f98 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Mon, 19 Aug 2024 20:17:24 +1000 Subject: [PATCH] Merge pull request #102 from EGroupware/fix-ralf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix PHP 8.0 error ("" < -1) as there is no automatic cast anymore Syn… --- src/lib/syncobjects/syncobject.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/syncobjects/syncobject.php b/src/lib/syncobjects/syncobject.php index 9b9edee6..c11b3cf6 100644 --- a/src/lib/syncobjects/syncobject.php +++ b/src/lib/syncobjects/syncobject.php @@ -528,8 +528,8 @@ public function Check($logAsDebug = false) { ZLog::Write(LOGLEVEL_WARN, sprintf("SyncObject->Check(): Unmet condition in object from type %s: parameter '%s' can not be compared, as the comparable is not set. Check failed!", $objClass, $v[self::STREAMER_VAR])); return false; } - if ( ($rule == self::STREAMER_CHECK_CMPHIGHER && $this->{$v[self::STREAMER_VAR]} < $cmp) || - ($rule == self::STREAMER_CHECK_CMPLOWER && $this->{$v[self::STREAMER_VAR]} > $cmp) + if ( ($rule == self::STREAMER_CHECK_CMPHIGHER && (float)$this->{$v[self::STREAMER_VAR]} < $cmp) || + ($rule == self::STREAMER_CHECK_CMPLOWER && (float)$this->{$v[self::STREAMER_VAR]} > $cmp) ) { ZLog::Write(LOGLEVEL_WARN, sprintf("SyncObject->Check(): Unmet condition in object from type %s: parameter '%s' is %s than '%s'. Check failed!",