Hi,
v2024
trying to write a value to a cookie in userfn.php via a function
function _hideOnboardCheckList() {
WriteCookie(
"dismissGetStarted",
"1",
time() + Config("REMEMBER_ME_EXPIRY_TIME"));
return;
}
the return statement is never hit,as it appears it never returns from Write Cookie, and the cookie isn’t written.
looks like an error is triggered:
{
"statusCode": 200,
"error": {
"class": "text-danger",
"type": "Error",
"description": "C:\\xampp\\htdocs\\dams\\vendor\\dflydev\\fig-cookies\\src\\Dflydev\\FigCookies\\FigResponseCookies.php(26): Dflydev\\FigCookies\\FigResponseCookies::set(): Argument #1 ($response) must be of type Psr\\Http\\Message\\ResponseInterface, null given, called in C:\\xampp\\htdocs\\dams\\src\\phpfn.php on line 890",
"trace": "#0 C:\\xampp\\htdocs\\dams\\src\\phpfn.php(890): Dflydev\\FigCookies\\FigResponseCookies::set(NULL, Object(Dflydev\\FigCookies\\SetCookie))\n#1 C:\\xampp\\htdocs\\dams\\src\\phpfn.php(934): PHPMaker2024\\dams\\SetCookie('dismissGetStart...', '1', 1763352160, false)\n#2 C:\\xampp\\htdocs\\dams\\src\\userfn.php(2024): PHPMaker2024\\dams\\WriteCookie('dismissGetStart...', '1', -1)\n#3 C:\\xampp\\htdocs\\dams\\src\\userfn.php(2285): }
Thanks,