Skip to content

Commit

Permalink
Merge pull request #2136 from nextcloud/automated/noid/psalm-baseline…
Browse files Browse the repository at this point in the history
…-update-1678425123

[Automated] Update psalm-baseline.xml
  • Loading branch information
szaimen authored Mar 10, 2023
2 parents 5e6e433 + c5bfdbb commit 0b15352
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion php/psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.7.7@e028ba46ba0d7f9a78bc3201c251e137383e145f"/>
<files psalm-version="5.8.0@9cf4f60a333f779ad3bc704a555920e81d4fdcda"/>
2 changes: 2 additions & 0 deletions php/psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config"
errorBaseline="psalm-baseline.xml"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="templates"/>
Expand Down
5 changes: 4 additions & 1 deletion php/src/Data/ConfigurationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ public function GetLastBackupTime() : string {
}

$lastBackupLines = explode("\n", $content);
$lastBackupLine = $lastBackupLines[sizeof($lastBackupLines) - 2];
$lastBackupLine = "";
if (count($lastBackupLines) >= 2) {
$lastBackupLine = $lastBackupLines[sizeof($lastBackupLines) - 2];
}
if ($lastBackupLine === "") {
return '';
}
Expand Down

0 comments on commit 0b15352

Please sign in to comment.