Skip to content

Commit

Permalink
Merge pull request #954 from nextcloud/fix/contexts/null-context-props
Browse files Browse the repository at this point in the history
fix(api): ContextMapper now coerces the row ID to an int for proper comparison
  • Loading branch information
juliusknorr authored Mar 27, 2024
2 parents d5653e4 + 440b2cb commit 4826a10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Db/ContextMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function findAll(?string $userId = null): array {
foreach ($contextIds as $contextId) {
$workArray = [];
foreach ($r as $row) {
if ($row['id'] === $contextId) {
if ((int) $row['id'] === $contextId) {
$workArray[] = $row;
}
}
Expand Down Expand Up @@ -188,7 +188,7 @@ public function findForNavBar(string $userId): array {
foreach ($contextIds as $contextId) {
$workArray = [];
foreach ($r as $row) {
if ($row['id'] === $contextId) {
if ((int) $row['id'] === $contextId) {
$workArray[] = $row;
}
}
Expand Down

0 comments on commit 4826a10

Please sign in to comment.