Skip to content

Commit

Permalink
Cast source keys to strings (NOJIRA)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Aug 6, 2024
1 parent c997182 commit 36d82a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 36d82a0

Please sign in to comment.