We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8df6c2c commit dd4200bCopy full SHA for dd4200b
Model/Document/Helper/File.php
@@ -115,14 +115,12 @@ public function deleteFile(string $filePath): bool
115
{
116
try {
117
$directoryWrite = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);
118
- if ($filePath && $directoryWrite->isFile($filePath)) {
119
- return $directoryWrite->delete($filePath);
120
- }
+ return $filePath && $directoryWrite->isFile($filePath) && $directoryWrite->delete($filePath);
121
} catch (FileSystemException $e) {
122
$this->logger->error($e->getLogMessage(), $e->getTrace());
123
-
124
- return false;
125
}
+
+ return false;
126
127
128
private function resolveFileSubPath(DocumentTypeInterface $documentType, string $fileName): string
0 commit comments