From e6a213bb7c23b12a3f157a784bb79885915cdca1 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sun, 26 Mar 2023 11:30:20 +0100
Subject: [PATCH] Only debug auth_cookie_malformed when non-empty

---
 login-debug.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/login-debug.php b/login-debug.php
index dd782ff..b2f67e1 100644
--- a/login-debug.php
+++ b/login-debug.php
@@ -9,7 +9,9 @@
 **/
 
 function debug_login_auth_cookie_malformed($cookie, $scheme) {
-    error_log("LOGIN: auth_cookie_malformed: scheme={$scheme} cookie={$cookie}");
+    if ($cookie) {
+        error_log("LOGIN: auth_cookie_malformed: scheme={$scheme} cookie={$cookie}");
+    }
 }
 add_action('auth_cookie_malformed', 'debug_login_auth_cookie_malformed', 10, 2);
 
-- 
GitLab