title: yii unsecure attribute while using mimetypes file validation
body: <p>i use the following mime type file validation</p>
  
  <pre><code> array('image', 'file', 'allowEmpty' =&gt; true,'mimeTypes'=&gt;'image/gif, image/jpeg, image/jpg, image/png', 'on' =&gt; 'update')
  </code></pre>
  
  <p>works well if a file doesnt have the right mime type.
  but if the validation is successful, the logg sais</p>
  
  <pre><code>2012/09/27 17:13:02 [warning] [application] unsafe Attribut "image" couldnt be set.
  </code></pre>
  
  <p>but it is defintily declared as save</p>
  
  <pre><code>array('image', 'safe', 'on' =&gt; 'update')
  </code></pre>
  
  <p>thats why i receive an error like this</p>
  
  <pre><code>finfo_file(C:\xampp\tmp\php3729.tmp): failed to open stream: No such file or directory
  $mimeType=finfo_file($info,$file-&gt;getTempName());
  </code></pre>
  
  <p>seems, that the file cant be saved i its unsafe attribute.
  the strange thing is, if i uncomment the validation rule with mimeTypes check, everthing works fine.</p>
  
  <p>in my controller i set the image file like this</p>
  
  <pre><code>   if (isset($_POST['User'])) {
              $user-&gt;attributes = $_POST['User'];
              $user-&gt;image = CUploadedFile::getInstance($user, 'image');
              if ($user-&gt;validate()) {
  </code></pre>