Fix exception thrown when the analyzer doesn't return filesize with the metadata

This commit is contained in:
drigato 2014-11-12 14:45:50 -05:00
parent b324031ee6
commit 95517cac87
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ class Rest_MediaController extends Zend_Rest_Controller
//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();