summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/download_helper.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index ea3da1bf4..b2f0edb48 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -77,6 +77,7 @@ if ( ! function_exists('force_download'))
return;
}
+ reset($filename);
$filepath = key($filename);
$filename = current($filename);
@@ -84,23 +85,18 @@ if ( ! function_exists('force_download'))
{
return;
}
-
- if ( ! @is_file($filepath) OR ($filesize = @filesize($filepath)) === FALSE)
- {
- return;
- }
}
else
{
- if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE)
- {
- return;
- }
-
$filepath = $filename;
$filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename));
$filename = end($filename);
}
+
+ if ( ! @is_file($filepath) OR ($filesize = @filesize($filepath)) === FALSE)
+ {
+ return;
+ }
}
else
{