fix scrutinizer reported issue
empty only works with variables, not constants - here we want to error out if PATH either isn't defined or does not end in a directory separator, so we can concatenate onto it
This commit is contained in:
parent
8b3d66b8e2
commit
f4e8e363cb
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ class Controller
|
|||
error_log(I18n::_('%s requires php %s or above to work. Sorry.', I18n::_('PrivateBin'), self::MIN_PHP_VERSION));
|
||||
return;
|
||||
}
|
||||
if (!empty(PATH) && substr(PATH, -1) !== DIRECTORY_SEPARATOR) {
|
||||
if (!defined('PATH') || substr(PATH, -1) !== DIRECTORY_SEPARATOR) {
|
||||
error_log(I18n::_('%s requires the PATH to end in a "%s". Please update the PATH in your index.php.', I18n::_('PrivateBin'), DIRECTORY_SEPARATOR));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue