From db874f0fbe0429cd185c5420daf47db3cc96cc93 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 31 Oct 2016 14:27:19 -0400 Subject: [PATCH] ping.php improvement: using baser cache key --- boot.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index 5df6520dbd..8dd43101c0 100644 --- a/boot.php +++ b/boot.php @@ -800,7 +800,9 @@ class App { return self::$a->get_baseurl($ssl); } - if (!isset($this->baseurl[$ssl ? 'https' : 'http'])) { + $cache_index = $ssl ? 'https' : 'http'; + + if (!isset($this->baseurl[$cache_index])) { $scheme = $this->scheme; if ((x($this->config, 'system')) && (x($this->config['system'], 'ssl_policy'))) { @@ -824,9 +826,9 @@ class App { $this->hostname = get_config('config', 'hostname'); } - $this->baseurl[$ssl ? 'https' : 'http'] = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); + $this->baseurl[$cache_index] = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); } - return $this->baseurl[$ssl ? 'https' : 'http']; + return $this->baseurl[$cache_index]; } /**