From a0d99f5be53599dcd4d5a0cdc93cb070acc6ab59 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Tue, 29 Sep 2015 11:29:52 -0400 Subject: [PATCH] Make sure doc root rtrimmed in Env --- lib/Minify/Env.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Minify/Env.php b/lib/Minify/Env.php index e9a931e..d7260bb 100644 --- a/lib/Minify/Env.php +++ b/lib/Minify/Env.php @@ -3,7 +3,7 @@ class Minify_Env { /** - * @return null + * @return string */ public function getDocRoot() { @@ -11,7 +11,7 @@ class Minify_Env { } /** - * @return null + * @return string */ public function getRequestUri() { @@ -29,6 +29,8 @@ class Minify_Env { $this->server = $options['server']; if (empty($this->server['DOCUMENT_ROOT'])) { $this->server['DOCUMENT_ROOT'] = $this->computeDocRoot($options['server']); + } else { + $this->server['DOCUMENT_ROOT'] = rtrim($this->server['DOCUMENT_ROOT'], '/\\'); } $this->get = $options['get']; $this->cookie = $options['cookie'];