summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class10
1 files changed, 10 insertions, 0 deletions
diff --git a/it.class b/it.class
index 9fcd3ef..442fd66 100644
--- a/it.class
+++ b/it.class
@@ -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);
+}
+
}