From 0b46a5f935e7e3a669e68455dce294dc70a94182 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 13 Mar 2017 23:09:09 +0100 Subject: [PATCH] Standards: add braces (thanks @Hypolite) --- include/security.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/security.php b/include/security.php index 23fc400b3a..afb37a72d8 100644 --- a/include/security.php +++ b/include/security.php @@ -21,15 +21,18 @@ function cookie_hash($user) { */ function new_cookie($time, $user = array()) { - if ($time != 0) + if ($time != 0) { $time = $time + time(); + } - if ($user) + if ($user) { $value = json_encode(array("uid" => $user["uid"], "hash" => cookie_hash($user), "ip" => $_SERVER['REMOTE_ADDR'])); - else + } + else { $value = ""; + } setcookie("Friendica", $value, $time, "/", "", (get_config('system', 'ssl_policy') == SSL_POLICY_FULL), true);