Reputation: 45
So I'm getting this error message saying that I'm missing an argument for a school project that I'm working on, and the code is being called here:
isconcurrent = $this->get('session')->get('is_concurrent');
$session->set('id_phase', '');
And it's defined here:
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;
}
}
}
Why is there an error here? Isconcurrent is argument 3, and it's being called in the code, so why is there an error message that pops up?
Upvotes: 0
Views: 557
Reputation: 2595
in the code you pasted here you are missing the $
in front of your variable declaration
$isconcurrent = $this->get('session')->get('is_concurrent');
Upvotes: 2