refactored error and file classes.

This commit is contained in:
Taylor Otwell
2011-07-07 23:40:29 -05:00
parent 4b063ac042
commit 6a77a98f95
2 changed files with 10 additions and 14 deletions

View File

@@ -125,11 +125,6 @@ class File {
*/
public static function upload($key, $path)
{
if ( ! array_key_exists($key, $_FILES))
{
return false;
}
return move_uploaded_file($_FILES[$key]['tmp_name'], $path);
return array_key_exists($key, $_FILES) ? move_uploaded_file($_FILES[$key]['tmp_name'], $path) : false;
}
}