diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 52843c738..a29054ed9 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -134,8 +134,9 @@ class ApiController extends Zend_Controller_Action */ if (!$file_base_name) { $file_base_name = $full_path; - } - $file_base_name = substr($file_base_name, 1); + } else { + $file_base_name = substr($file_base_name, 1); + } // possibly use fileinfo module here in the future. // http://www.php.net/manual/en/book.fileinfo.php $ext = pathinfo($fileID, PATHINFO_EXTENSION);