From 627a19a2a93f2253d215084c358f022dc1be4a57 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 7 Oct 2014 15:57:00 +0200 Subject: [PATCH] Fix warning "references should be passed by variable" --- library/Icinga/Application/Platform.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Application/Platform.php b/library/Icinga/Application/Platform.php index 179e2578c..d31fce70e 100644 --- a/library/Icinga/Application/Platform.php +++ b/library/Icinga/Application/Platform.php @@ -126,7 +126,8 @@ class Platform if (substr(self::$fqdn, 0, strlen(self::$hostname)) === self::$hostname) { self::$domain = substr(self::$fqdn, strlen(self::$hostname) + 1); } else { - self::$domain = array_shift(preg_split('~\.~', self::$hostname, 2)); + $parts = preg_split('~\.~', self::$hostname, 2); + self::$domain = array_shift($parts); } }