From 6840589f4e8770ebb31542ef7766717c55feda58 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 4 Oct 2014 18:28:42 +0200 Subject: [PATCH] Fix trailing newline --- src/pocketmine/PocketMine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 905752eb0..809a0d88c 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -133,7 +133,7 @@ namespace pocketmine { $logger = new MainLogger(\pocketmine\DATA . "server.log", \pocketmine\ANSI); if(!ini_get("date.timezone")){ - if($timezone = detect_system_timezone() and date_default_timezone_set($timezone)){ + if(($timezone = trim(detect_system_timezone())) and date_default_timezone_set($timezone)){ //Success! Timezone has already been set and validated in the if statement. //This here is just for redundancy just in case some stupid program wants to read timezone data from the ini. ini_set("date.timezone", $timezone); @@ -203,7 +203,7 @@ namespace pocketmine { //Portable method for incompatible linux distributions. - $offset = exec('date +%:z'); + $offset = trim(exec('date +%:z')); if($offset == "+00:00"){ return "UTC";