Fix php 8.0 php notices - Undefined index

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2019-12-16 20:14:25 +01:00
parent db973e60e9
commit 52cef30384
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -1636,7 +1636,11 @@ class Config
* @return mixed result of getCookie()
*/
public function getCookie($cookieName) {
return @$_COOKIE[$this->getCookieName($cookieName)];
if (isset($_COOKIE[$this->getCookieName($cookieName)])) {
return $_COOKIE[$this->getCookieName($cookieName)];
} else {
return null;
}
}
/**