Cakephp错误:发生了内部错误

Ami*_*ury 7 cakephp internal-server-error

我在cakephp中有一些代码会产生错误.

这是PHP控制器:

$this->loadModel( 'Vote' ); //Newly added by amit start
$vote=$this->Vote->getVote($id,$uid);
$this->set('vote',$vote);
$voteCount = count($vote);
$this->set('voteCount',$voteCount);

$voteShow = $this->Vote->find('all', array(
    'fields' => array('SUM(Vote.score)   AS score','count(id) as countId'),
     'conditions'=>array('Vote.type_id'=>$id),
));
$this->set('voteShow',$voteShow);
Run Code Online (Sandbox Code Playgroud)

模型:

public function getVote($id,$uid) {
    if (empty($conditions))
        $conditions = array('Vote.type' => 'blog',
                            'Vote.type_id' => $id,
                            'Vote.user_id' => $uid);

    $users = $this->find('all', array('conditions' => $conditions,
        'order' => 'Vote.id desc'
    ));
    return $users;
}
Run Code Online (Sandbox Code Playgroud)

该代码产生此错误:

Error : An internal error has occurred
Run Code Online (Sandbox Code Playgroud)

这个错误是什么意思?

Ami*_*ury 10

我启用了调试模式:Configure::write('debug', 2);在core.php中它解决了我的问题.