diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 4547230d5..52843c738 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -129,6 +129,9 @@ class ApiController extends Zend_Controller_Action if(is_file($filepath)){ $full_path = $media->getPropelOrm()->getDbFilepath(); $file_base_name = strrchr($full_path, '/'); + /* If $full_path does not contain a '/', strrchr will return false, + * in which case we can use $full_path as the base name. + */ if (!$file_base_name) { $file_base_name = $full_path; }