summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-05-14 21:29:30 +0200
committerTimothy Warren <tim@timshomepage.net>2012-05-14 21:29:30 +0200
commit43c216b998ccf8c8208b237e9e0d9c468c8a82e5 (patch)
treeff019239050f430990c664ff3dbf61545291445d /system/libraries/Upload.php
parent9e0be2ba2179a93200d16a72c74e2ac61f9a71d4 (diff)
parentfff6c2a3caa1ce14e58fcb3ee0d937d17985eea1 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into patch
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 8ad67050d..24d4bd4d0 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -725,7 +725,7 @@ class CI_Upload {
public function get_extension($filename)
{
$x = explode('.', $filename);
- return '.'.end($x);
+ return (count($x) !== 1) ? '.'.end($x) : '';
}
// --------------------------------------------------------------------
@@ -850,6 +850,10 @@ class CI_Upload {
{
return TRUE; // its an image, no "triggers" detected in the first 256 bytes, we're good
}
+ else
+ {
+ return FALSE;
+ }
}
if (($data = @file_get_contents($file)) === FALSE)
@@ -1099,4 +1103,4 @@ class CI_Upload {
}
/* End of file Upload.php */
-/* Location: ./system/libraries/Upload.php */ \ No newline at end of file
+/* Location: ./system/libraries/Upload.php */