avoid empty value for makeCorrectDir as the assert-check runs before evaluating to / in certain places

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2015-07-31 10:44:33 +02:00
parent 089fb25da7
commit d86fb7ed23
3 changed files with 7 additions and 7 deletions

View File

@@ -57,7 +57,7 @@ if ($page == 'overview') {
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
$row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']));
$row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']) - 1);
} else {
$row['documentroot'] = $row['homedir'];
}