From b5f6077c046dc01ca0df67c10821846c9a472429 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Tue, 3 Feb 2015 16:22:12 -0500 Subject: [PATCH] Quick fix for pro --- .../application/controllers/ApiController.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index b7937de0d..a274f588a 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -157,17 +157,9 @@ class ApiController extends Zend_Controller_Action if (!$location || $location == "") { throw new FileDoesNotExistException("Requested file does not exist!"); } - - // If we're passing in a Stored File object, it's faster - // to use getFileSize() and pass in the result - if (!$size || $size <= 0) { - $size= filesize($location); - } - - if ($size <= 0) { - throw new Exception("Invalid file size returned for file at $location"); - } - + + $size= filesize($location); + $fm = @fopen($location, 'rb'); if (!$fm) { header ("HTTP/1.1 505 Internal server error");