Skip to content

Commit

Permalink
fix(feed): avoid send empty files
Browse files Browse the repository at this point in the history
  • Loading branch information
ezandonai committed Jun 14, 2024
1 parent 8716fd0 commit 3e9cd08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AbstractFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ public function saveFeed(FeedElementInterface $feed, string $directory, string $

public function sendFeed(string $filePath, string $sftpUsername, string $sftpPassword, string $sftpDirectory = 'import-inbox', string $sftpPort = '22'): bool
{
if (filesize($filePath) === 0) {
throw new Exception('The file is empty.');
}

$filename = basename($filePath);

$sftp = new SFTP($this->getHost(), $sftpPort);
Expand Down

0 comments on commit 3e9cd08

Please sign in to comment.