title: Cakephp Error: An internal error has occurred
body: <p>I have some code in cakephp which produces an error.  </p>
  
  <p>Here is the PHP Controller:</p>
  
  <pre><code>$this-&gt;loadModel( 'Vote' ); //Newly added by amit start
  $vote=$this-&gt;Vote-&gt;getVote($id,$uid);
  $this-&gt;set('vote',$vote);
  $voteCount = count($vote);
  $this-&gt;set('voteCount',$voteCount);
  
  $voteShow = $this-&gt;Vote-&gt;find('all', array(
      'fields' =&gt; array('SUM(Vote.score)   AS score','count(id) as countId'),
       'conditions'=&gt;array('Vote.type_id'=&gt;$id),
  ));
  $this-&gt;set('voteShow',$voteShow);
  </code></pre>
  
  <p>model: </p>
  
  <pre><code>public function getVote($id,$uid) {
      if (empty($conditions))
          $conditions = array('Vote.type' =&gt; 'blog',
                              'Vote.type_id' =&gt; $id,
                              'Vote.user_id' =&gt; $uid);
  
      $users = $this-&gt;find('all', array('conditions' =&gt; $conditions,
          'order' =&gt; 'Vote.id desc'
      ));
      return $users;
  }
  </code></pre>
  
  <p>That code produces this error:</p>
  
  <pre><code>Error : An internal error has occurred
  </code></pre>
  
  <p>What does this error mean?</p>