title: Upload and its behaviors do not have a method or closure named "getErrors"
body: <p>I am trying to build a form which would upload an image to the server.
  So I have 3 files.</p>
  
  <ol>
  <li><p>Model Upload.php</p>
  
  <pre><code>&lt;?php
  class Upload extends CActiveForm
  {
      public $image;
  
      public function rules()
      {
          return array(
              array('image', 'file', 'types'=&gt;'jpg, gif, png'),
          );
      }
  }
  </code></pre></li>
  <li><p>View Upload.php</p>
  
  <pre><code>&lt;div class="box"&gt;
      &lt;div class="body"&gt;
          &lt;header class="clearfix"&gt;
              &lt;div class="icons"&gt;&lt;i class="icon-picture"&gt;&lt;/i&gt;&lt;/div&gt;
              &lt;h5 class="pull-left"&gt;Upload Your Memes&lt;/h5&gt;
          &lt;/header&gt;
          &lt;div class="form"&gt;
              &lt;?php $form=$this-&gt;beginWidget('CActiveForm'); ?&gt;
  
              &lt;?php echo $form-&gt;errorSummary($model); ?&gt;
              &lt;?php echo $form-&gt;label($model,'image'); ?&gt;
              &lt;?php echo $form-&gt;fileField($model,'image') ?&gt;&lt;br&gt;
              &lt;?php echo CHtml::submitButton('Submit'); ?&gt;
              &lt;?php $this-&gt;endWidget(); ?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre></li>
  <li><p>Controller.php</p>
  
  <pre><code>&lt;?php
  class MemeController extends AdminController {
      public function actionUpload() {
          $model=new Upload();
          if(isset($_POST['image']))
          {
              $model-&gt;attributes=$_POST['image'];
              $model-&gt;image=CUploadedFile::getInstance($model,'image');
              if($model-&gt;save())
              {
                  $model-&gt;image-&gt;saveAs('/volume1/web/memes/templates/test.png');
                  $this-&gt;redirect(Yii::app()-&gt;request-&gt;urlReferrer);
              }
          }
          $this-&gt;render('upload', array('model'=&gt;$model));
      }
  }
  </code></pre></li>
  </ol>
  
  <p>Any ideas on why I am getting 
  Error 500
  MemeUpload and its behaviors do not have a method or closure named "getErrors".
  ?
  I have tried suggestions in <a href="https://stackoverflow.com/questions/26035950/cactiveform-and-its-behaviors-do-not-have-a-method-or-closure-named-geterrors">this</a> link however that doesn't really help.
  All I'm getting after those changes is another error which is:
  Upload Your Memes</p>
  
  <p>Fatal error: Call to a member function errorSummary() on a non-object in /volume1/web/website/protected/modules/admin/themes/admin/views/meme/upload.php on line 10</p>
  
  <p>where line 10 is 
  <code>&lt;?php echo $form-&gt;errorSummary($model); ?&gt;</code></p>
  
  <p>Any ideas what else can I try?</p>