From 0d1ded07891e972146ff56f772e497eda4350e47 Mon Sep 17 00:00:00 2001 From: Adam Wiggins Date: Wed, 7 Sep 2011 18:13:05 -0700 Subject: [PATCH] coalesce operator --- AppInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppInfo.php b/AppInfo.php index 4b84977..b9ceaba 100644 --- a/AppInfo.php +++ b/AppInfo.php @@ -34,7 +34,7 @@ public static function appSecret() { * @return the home URL for this site */ public static function getHome () { - return ($_SERVER['HTTP_X_FORWARDED_PROTO'] || "http") . "//" . $_SERVER['HTTP_HOST'] . "/"; + return ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?: "http") . "//" . $_SERVER['HTTP_HOST'] . "/"; } }