Skip to content

Commit

Permalink
Fix exception thrown when the analyzer doesn't return filesize with t…
Browse files Browse the repository at this point in the history
…he metadata
  • Loading branch information
drigato committed Nov 12, 2014
1 parent b324031 commit 95517ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function putAction()
//as a foreign key to cc_music_dirs.
if (isset($requestData["full_path"])) {
$fileSizeBytes = filesize($requestData["full_path"]);
if ($fileSizeBytes === false)
if (!isset($fileSizeBytes) || $fileSizeBytes === false)
{
$file->setDbImportStatus(2)->save();
$this->fileNotFoundResponse();
Expand Down

1 comment on commit 95517ca

@asantoni
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Denise said the commit message is wrong for this - the logic is to prevent this from bailing when full_path is missing (can happen if there's an error in the analyzer).

Please sign in to comment.