summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-05-14 21:30:05 +0200
committerTimothy Warren <tim@timshomepage.net>2012-05-14 21:30:05 +0200
commitcb6c34eb5839d2b9c8d8ce70dcddde8931c0c277 (patch)
treec1932cf6460a9a8629c08deee5624e4ff8a099bd /system/libraries/Upload.php
parent6986479050e7bf02cbafd9dbc82640a9e3865bb9 (diff)
parentfff6c2a3caa1ce14e58fcb3ee0d937d17985eea1 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into email
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 */