Skip to content

Commit

Permalink
fix(workspace): Use filecache existance for checking if readme exists
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Knorr <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Feb 7, 2025
1 parent 2b2266c commit 6933f03
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Service/WorkspaceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ public function __construct(IL10N $l10n) {
public function getFile(Folder $folder): ?File {
foreach ($this->getSupportedFilenames() as $filename) {
try {
$file = $folder->get($filename);
$exists = $folder->getStorage()->getCache('')->get($filename);
if ($exists) {
$file = $folder->get($filename);
}
if ($file instanceof File) {

Check failure on line 37 in lib/Service/WorkspaceService.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

PossiblyUndefinedVariable

lib/Service/WorkspaceService.php:37:9: PossiblyUndefinedVariable: Possibly undefined variable $file, first seen on line 35 (see https://psalm.dev/018)
return $file;
}
Expand Down

0 comments on commit 6933f03

Please sign in to comment.