summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--system/helpers/download_helper.php16
2 files changed, 7 insertions, 11 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 161e0e225..de599a675 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1118,7 +1118,7 @@ abstract class CI_DB_driver {
*/
protected function _escape_str($str)
{
- return str_replace("'", "''", remove_invisible_characters($str));
+ return str_replace("'", "''", remove_invisible_characters($str, FALSE));
}
// --------------------------------------------------------------------
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
{