bug #2944069 [config] Extraneus dot from dirname() when installed in root, thanks to ayanamist

This commit is contained in:
Herman van Rink
2010-02-03 15:32:37 +00:00
parent 30b63d142e
commit 2ee9ff3e20
2 changed files with 6 additions and 0 deletions

View File

@@ -658,6 +658,11 @@ class PMA_Config
$path = dirname(dirname($path));
}
}
// PHP's dirname function would have returned a dot when $path contains no slash
if ($path == '.') {
$path = '';
}
// in vhost situations, there could be already an ending slash
if (substr($path, -1) != '/') {
$path .= '/';