Merge pull request #1116 from tubalmartin/helpers|url|2.1-stable

2.1 stable - An improved url_title helper function
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 91fbf66..b0490de 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1095,7 +1095,7 @@
 				$proc = @popen($cmd, 'r');
 				if (is_resource($proc))
 				{
-					$mime = @fread($test, 512);
+					$mime = @fread($proc, 512);
 					@pclose($proc);
 					if ($mime !== FALSE)
 					{