From 5efb7ed043e5ee4a9bcc7a2b92ac8b8800d2f3c7 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 7 Oct 2016 16:23:05 +0200 Subject: [PATCH] Default to empty string Otherwise `null` is returned which leads to a ton of similar error messages if the log condition setting is enabled.: ``` {"reqId":"3wVBarnDfOV3qkI1bVCU","remoteAddr":"89.98.78.41","app":"PHP","message":"hash_equals(): Expected user_string to be a string, null given at \/var\/www\/html\/lib\/private\/Log.php#275","level":3,"time":"2016-10-07T14:22:15+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"icewind"} ``` --- lib/private/Log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Log.php b/lib/private/Log.php index 6268de2bd57..0de5f34decb 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -272,7 +272,7 @@ class Log implements ILogger { $request = \OC::$server->getRequest(); // if token is found in the request change set the log condition to satisfied - if($request && hash_equals($logCondition['shared_secret'], $request->getParam('log_secret'))) { + if($request && hash_equals($logCondition['shared_secret'], $request->getParam('log_secret', ''))) { $this->logConditionSatisfied = true; } }