fix php 8.1 deprecations (#3648)
* show session maxlifetime in doctor * rephrase compatibility in release notes * bump version
This commit is contained in:
@@ -35,7 +35,12 @@ final class InvoiceDocument
|
||||
|
||||
public function getFilename(): string
|
||||
{
|
||||
return $this->file->getRealPath();
|
||||
$path = $this->file->getRealPath();
|
||||
if ($path === false) {
|
||||
throw new \Exception('Invoice template got deleted from filesystem');
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
public function getFileExtension(): string
|
||||
@@ -45,6 +50,11 @@ final class InvoiceDocument
|
||||
|
||||
public function getLastChange(): int
|
||||
{
|
||||
return $this->file->getMTime();
|
||||
$modified = $this->file->getMTime();
|
||||
if ($modified === false) {
|
||||
throw new \Exception('Invoice template got deleted from filesystem');
|
||||
}
|
||||
|
||||
return $modified;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user