From 654f9a542d64fdc9a5efb3c8ac08cc7553aa69ae Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 10 Dec 2018 15:41:35 +0100 Subject: packages/pkginfo.php: fix "Only variables should be passed by reference" warning --- packages/pkginfo.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/pkginfo.php b/packages/pkginfo.php index eac3b09..8265bc7 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -8,7 +8,9 @@ require_once BASE . "/lib/style.php"; $memcache = new Memcache; $memcache -> connect('localhost', 11211) or die ('Memcached Connection Error'); $pkgapi_reachable = $memcache -> get('pkgapi_reachable'); - $tld = array_pop((explode('.', $_SERVER['HTTP_HOST']))); + $tld = explode('.', $_SERVER['HTTP_HOST']); + end($tld); + $tld = current($tld); if (array_key_exists('HTTPS', $_SERVER) && ($_SERVER['HTTPS'] == 'on')) $protocol = 'https'; else -- cgit v1.2.3-70-g09d2