From 3e86cc27d531e15c7d7dc7c606f87e1694272f92 Mon Sep 17 00:00:00 2001 From: George PETCULESCU Date: Tue, 1 Nov 2016 14:02:46 +0200 Subject: fixed when $filename is an array with a different count than 1. --- system/helpers/download_helper.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') 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); -- cgit v1.2.3-24-g4f1b