3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-05 13:45:51 +00:00

Check that it’s an array (versus checking that it’s not a bool)

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2023-02-28 23:32:10 -08:00
parent b72a9cc6fd
commit 4860440306

View File

@ -116,7 +116,7 @@ class SettingsController extends Controller
if (function_exists('posix_getpwuid')) { // Probably Linux
$owner = posix_getpwuid(fileowner($_SERVER['SCRIPT_FILENAME']));
// This *shouldn't* be boolean, but we've seen this in come chrooted environments
if (!is_bool($owner)) {
if (is_array($owner)) {
$start_settings['owner'] = $owner['name'];
}
}