On logout, PHPCas::client could be already called
Alexandre-T opened this issue · 0 comments
Alexandre-T commented
On logout, phpCAS::client
could be called two times and crash.
We shall test phpCAS::isInitialized() before.
public function onLogoutSuccess(Request $request)
{
phpCAS::setDebug($this->cas->getDebug());
phpCAS::setVerbose($this->cas->isVerbose());
if (!phpCAS::isInitialized()) {
phpCAS::client(
$this->cas->getVersion(),
$this->cas->getHostname(),
$this->cas->getPort(),
$this->cas->getUrl()
);
}
}