mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
404.php: Squelch warning on empty PATH_INFO
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
333689a885
commit
9ec1cfa192
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue