Skip to content

Commit

Permalink
Make sure translation cache contains integers only
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed May 27, 2024
1 parent a9feec8 commit c7624ff
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private function getChildTranslation(int $id, string $table, string $ptable, str
return $this->translationCache[$table][$id] ?? null;
}

$this->translationCache[$table] = $this->connection->fetchAllKeyValue(
$this->translationCache[$table] = array_map('intval', $this->connection->fetchAllKeyValue(
<<<SQL
SELECT
c.id,
Expand All @@ -293,7 +293,7 @@ private function getChildTranslation(int $id, string $table, string $ptable, str
LEFT JOIN $ptable pt ON p.$parentField=pt.id
WHERE pt.id > 0
SQL,
);
));

return $this->translationCache[$table][$id] ?? null;
}
Expand Down

0 comments on commit c7624ff

Please sign in to comment.