strtotime('-1 day'), 'path' => $params['path'], 'domain' => $params['domain'], 'secure' => $params['secure'], 'httponly' => $params['httponly'], 'samesite' => $params['samesite'], )); } unset($_SESSION['editor']); session_destroy(); } delete_persistent_login(); $referrer = (string)($_SESSION['referrer'] ?? ''); unset($_SESSION['referrer']); if (is_local_path($referrer) && !preg_match("/logout(\.php)?$/i", $referrer)) header('Location: ' . $referrer); else header("Location: /"); return; ?>