We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bea620b commit ae00971Copy full SHA for ae00971
htdocs/include/xoopssetcookie.php
@@ -34,8 +34,8 @@ function xoops_setcookie(
34
string $name,
35
?string $value = '',
36
int $expire = 0,
37
- $path = '/',
38
- $domain = '',
+ ?string $path = '/',
+ ?string $domain = '',
39
?bool $secure = null,
40
bool $httponly = true,
41
string $samesite = 'Lax'
@@ -50,6 +50,9 @@ function xoops_setcookie(
50
if (!is_string($host)) {
51
$host = ''; // Fallback for invalid XOOPS_URL
52
}
53
+ if (!is_string($domain)) {
54
+ $domain = ''; // Fallback for invalid domain
55
+ }
56
57
// Validate the domain BEFORE using it.
58
if (class_exists('\Xoops\RegDom\RegisteredDomain')) {
0 commit comments