Skip to content

Commit

Permalink
Merge pull request #1 from boite/master
Browse files Browse the repository at this point in the history
fix: avoid passing non-strings to strcmp
  • Loading branch information
joostfaassen authored Nov 25, 2022
2 parents f18384d + ac6ea81 commit 8454968
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/ResourceContext/ResourceContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function getResources(): array
}

usort($resources, function($b, $a) {
return strcmp($a['core.xillion.cloud/datetime'] ?? null, $b['core.xillion.cloud/datetime'] ?? null);
return strcmp($a['core.xillion.cloud/datetime'] ?? '', $b['core.xillion.cloud/datetime'] ?? '');
});

return $resources;
Expand Down

0 comments on commit 8454968

Please sign in to comment.