Merge pull request #1003 from PrivateBin/yourls-cleanup

improve configuration wording, adjust self check
This commit is contained in:
El RIDO 2022-11-03 19:54:56 +01:00 committed by GitHub
commit 66600e5eb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 20 deletions

View file

@ -236,6 +236,14 @@ class Configuration
if (!array_key_exists($this->_configuration['expire']['default'], $this->_configuration['expire_options'])) {
$this->_configuration['expire']['default'] = key($this->_configuration['expire_options']);
}
// ensure the basepath ends in a slash, if one is set
if (
strlen($this->_configuration['main']['basepath']) &&
substr_compare($this->_configuration['main']['basepath'], '/', -1) !== 0
) {
$this->_configuration['main']['basepath'] .= '/';
}
}
/**