adding check for PATH ending in DIRECTORY_SEPARATOR, fixes #86

This commit is contained in:
El RIDO
2016-08-22 09:46:26 +02:00
parent 47d6bd7a02
commit 6aba39488f
6 changed files with 19 additions and 5 deletions

View File

@@ -114,6 +114,7 @@ class PrivateBin
* initializes and runs PrivateBin
*
* @access public
* @throws Exception
* @return void
*/
public function __construct()
@@ -121,6 +122,9 @@ class PrivateBin
if (version_compare(PHP_VERSION, '5.3.0') < 0) {
throw new Exception(I18n::_('PrivateBin requires php 5.3.0 or above to work. Sorry.'), 1);
}
if (strlen(PATH) < 0 && substr(PATH, -1) !== DIRECTORY_SEPARATOR) {
throw new Exception(I18n::_('PrivateBin requires the PATH to end in a "%s". Please update the PATH in your index.php.', DIRECTORY_SEPARATOR), 5);
}
// load config from ini file, initialize required classes
$this->_init();