From 36d82a0aa554db93912fefead4c779054d37eda9 Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Tue, 6 Aug 2024 17:02:03 -0400 Subject: [PATCH] Cast source keys to strings (NOJIRA) --- app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php b/app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php index 363200269..4fb42fe66 100644 --- a/app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php +++ b/app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php @@ -169,7 +169,9 @@ protected function fullSync() { $this->llog('trace', "EIS " . $this->runContext->eis->description . " updating entry $sourceKey"); - $this->syncRecord($sourceKey); + // Cast $sourceKey to a string in case the backend return an int or + // PHP decides to interpret the key as an int + $this->syncRecord((string)$sourceKey); } else { $this->llog('trace', "EIS " . $this->runContext->eis->description . " skipping changelist entry $sourceKey on update since record is not already synced"); @@ -192,7 +194,7 @@ protected function fullSync() { $this->llog('trace', "EIS " . $this->runContext->eis->description . " processing new entry $sourceKey"); - $this->syncRecord($sourceKey); + $this->syncRecord((string)$sourceKey); } }