From 95517cac874aa807c836fa7aa53a3776a9b95ed5 Mon Sep 17 00:00:00 2001 From: drigato Date: Wed, 12 Nov 2014 14:45:50 -0500 Subject: [PATCH] Fix exception thrown when the analyzer doesn't return filesize with the metadata --- .../application/modules/rest/controllers/MediaController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/modules/rest/controllers/MediaController.php b/airtime_mvc/application/modules/rest/controllers/MediaController.php index dbbc346ba0..87af946bb1 100644 --- a/airtime_mvc/application/modules/rest/controllers/MediaController.php +++ b/airtime_mvc/application/modules/rest/controllers/MediaController.php @@ -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();