diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2017-02-27 17:56:20 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2017-02-27 18:20:00 +0100 |
commit | 9ec1cfa1923ffc28a7fb23aa94f408e16cd70837 (patch) | |
tree | 3bf247977f542d553b1448eda5561c89e58596cb /web/html | |
parent | 333689a885fb50fdfc8068b5885c41b9d3cf1510 (diff) | |
download | aur-9ec1cfa1923ffc28a7fb23aa94f408e16cd70837.tar.gz aur-9ec1cfa1923ffc28a7fb23aa94f408e16cd70837.tar.xz |
404.php: Squelch warning on empty PATH_INFO
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/404.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/html/404.php b/web/html/404.php index 757c4855..9f81d115 100644 --- a/web/html/404.php +++ b/web/html/404.php @@ -5,7 +5,7 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib'); $path = $_SERVER['PATH_INFO']; $tokens = explode('/', $path); -if (preg_match('/^([a-z0-9][a-z0-9.+_-]*?)(\.git)?$/', $tokens[1], $matches)) { +if (isset($tokens[1]) && preg_match('/^([a-z0-9][a-z0-9.+_-]*?)(\.git)?$/', $tokens[1], $matches)) { $gitpkg = $matches[1]; if (pkg_from_name($gitpkg)) { $gitcmd = 'git clone ' . sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($gitpkg)); |