diff --git a/snippets/php/path_root_validation.php b/snippets/php/path_root_validation.php index 07bc79d..315e113 100644 --- a/snippets/php/path_root_validation.php +++ b/snippets/php/path_root_validation.php @@ -93,6 +93,10 @@ class PathValidator $userinfo = posix_getpwuid(posix_getuid()); $homedir = $userinfo['dir']; } + else + { + throw new Exception("Could not find a way to get the home directory of the current user."); + } $homedir = $this->RemoveTrailingSlash($homedir);