summaryrefslogtreecommitdiffstats
path: root/system/helpers/download_helper.php
diff options
context:
space:
mode:
authorGeorge PETCULESCU <george.petculescu@zitec.com>2016-11-01 13:02:46 +0100
committerGeorge PETCULESCU <george.petculescu@zitec.com>2016-11-01 13:02:46 +0100
commit3e86cc27d531e15c7d7dc7c606f87e1694272f92 (patch)
tree0301373e17bae03779db316092d8e715df913e62 /system/helpers/download_helper.php
parent54a1138a864a9d2d3ce7ef6d4b9d22df86440bb5 (diff)
fixed when $filename is an array with a different count than 1.
Diffstat (limited to 'system/helpers/download_helper.php')
-rw-r--r--system/helpers/download_helper.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index eb714c1ff..43c3924a3 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -70,8 +70,13 @@ if ( ! function_exists('force_download'))
elseif ($data === NULL)
{
// Is $filename an array as ['local source path' => 'destination filename']?
- if (is_array($filename) && count($filename) == 1)
+ if (is_array($filename))
{
+ if (count($filename) != 1)
+ {
+ return;
+ }
+
$filepath = key($filename);
$filename = current($filename);