mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 08:57:55 +00:00
var/www/pages/index.php : use array_diff() instead of array_filter()
This commit is contained in:
parent
f48218397a
commit
1b10dec06f
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ $git_prefix = "/data/git/gitea-repositories";
|
|||
$parts = explode("/", $request_url);
|
||||
|
||||
# Remove empty first, potentially empty parts between //. If URL ends on "/", last entry in array is empty too. Remove it:
|
||||
$parts = array_filter($parts, function($p) { return strlen($p) > 0; });
|
||||
$parts = array_diff($parts, array(""));
|
||||
|
||||
$owner = strtolower(array_shift($parts));
|
||||
$git_root = realpath("$git_prefix/$owner/pages.git");
|
||||
|
|
Loading…
Reference in a new issue