Merge pull request #2136 from nextcloud/automated/noid/psalm-baseline-update-1678425123

[Automated] Update psalm-baseline.xml
This commit is contained in:
Simon L 2023-03-10 11:27:53 +01:00 committed by GitHub
commit 0b15352132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -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"/>

View file

@ -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"/>

View file

@ -78,7 +78,10 @@ class ConfigurationManager
}
$lastBackupLines = explode("\n", $content);
$lastBackupLine = $lastBackupLines[sizeof($lastBackupLines) - 2];
$lastBackupLine = "";
if (count($lastBackupLines) >= 2) {
$lastBackupLine = $lastBackupLines[sizeof($lastBackupLines) - 2];
}
if ($lastBackupLine === "") {
return '';
}