diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1261,4 +1261,14 @@ static function params2utf8() unset($_REQUEST[$key], $_GET[$key]); } +/** + * Compatibility function to map new setcookie() parameters to pre-7.3 PHP version + */ +static function setcookie($name, $value, $p = []) +{ + return version_compare(PHP_VERSION, '7.3.0', '<') + ? @setcookie($name, $value, $p['expires'], $p['path'], $p['domain'], $p['secure'], $p['httponly']) + : @setcookie($name, $value, $p); +} + } |