mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-08-03 03:56:16 -04:00
ensure the basepath ends in a slash, if one is set
This commit is contained in:
parent
432d3e71d3
commit
987ead2719
2 changed files with 9 additions and 1 deletions
|
@ -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'] .= '/';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue