title: kohana file validate error
body: <p>I can't seem to figure out the cause of this error when trying to validate a image upload</p>
  
  <pre><code>$imagevalidate = Validate::factory($_FILES);
  $imagevalidate-&gt;rules($_FILES['profile_picture'], array(
      'Upload::valid' =&gt; array(),
      'Upload::not_empty' =&gt; array(),
      'Upload::type' =&gt; array(
          'Upload::type' =&gt; array(
              'jpg',
              'png',
              'gif'
          )
      ),
      'Upload::size' =&gt; array(
          '1M'
      )
  ));
  if ($imagevalidate-&gt;check()) {
      $picture = Upload::save($_FILES['profile_picture']);
      Image::factory($picture)-&gt;resize(200, 200, Image::WIDTH)-&gt;save();
      $profile-&gt;profile_picture = basename($picture);
  } else {
      $errors = $imagevalidate()-&gt;errors('profile/edit');
  }
  </code></pre>
  
  <p>I am getting this error ErrorException [ Warning ]: Illegal offset type in isset or empty</p>