I am trying to validate file, but I get following error: Illegal offset type in isset or empty . What I am doing wrong ?
$array = Validate::factory($_FILES);
$array->rule($_FILES['image'], 'Upload::not_empty');
if ($array->check())
{
$directory = DOCROOT.'uploads/';
$filepath = Upload::save($_FILES['image'], 'SDFFasreixcsd.jpg', $directory);
}