所以我收到这条错误消息,说我错过了我正在研究的学校项目的参数,并且代码在这里被调用:
isconcurrent = $this->get('session')->get('is_concurrent');
$session->set('id_phase', '');
它在这里定义:
public function hasrights($user, $site_slug, $isconcurrent)
{
$site = $this->dem->getRepository('DocumentInfo')->findOneByDocumentId($book_slug->getId());
if($site->Access()){
$this->session->set('is_access',1);
}else{
$this->session->set('is_access',0);
}
if($isconcurrent && $this->session->get('concurrent_information')->id_list){
if (in_array($site_slug->getId(), $this->session->get('cocurrent_information')->id_list)){
return true;
}else{
return false;
}
}else if ($user) {
if ($site_slug && 1 == $site->Access()) {
$allow_access = $this->authentication($user->getEmail(), $book->getSku());
return $allow_access;
} else {
return false;
}
} else {
return false;
}
}
}
为什么这里有错误? Isconcurrent是参数3,它在代码中被调用,为什么会弹出一条错误消息?
答案 0 :(得分:2)
在您粘贴的代码中,您缺少变量声明前面的$
$ isconcurrent = $ this-> get(' session') - > get(' is_concurrent');