open_basedir fix
authorMichael Wallner <mike@php.net>
Fri, 20 Dec 2013 15:17:46 +0000 (16:17 +0100)
committerMichael Wallner <mike@php.net>
Fri, 20 Dec 2013 15:17:46 +0000 (16:17 +0100)
mdref/Path.php

index efa208a31847dc9bafa6e22f436991cc32b1b050..e0d00c752195b90ba4ef7f8280c8257d5a6809f0 100644 (file)
@@ -70,7 +70,15 @@ class Path
         * @return string
         */
        function getFullPath($ext = "") {
-               return $this->baseDir . DIRECTORY_SEPARATOR . $this->path . $ext;
+               $path = "";
+               if (strlen($this->baseDir)) {
+                       $path .= $this->baseDir . DIRECTORY_SEPARATOR;
+               }
+               if (strlen($this->path)) {
+                       $path .= $this->path;
+               }
+               $path .= $ext;
+               return $path;
        }
        
        /**
@@ -97,4 +105,4 @@ class Path
                }
                return $head . "<pre>" . $html ."</pre>"; 
        }
-}
\ No newline at end of file
+}