Grocy docker patch fix (#94)

fixed:

Warning: Use of undefined constant GROCY_USER_ID - assumed
'GROCY_USER_ID' (this will throw an Error in a future version of PHP) in
/www/controllers/BaseController.php on line 47
This commit is contained in:
Talmai Oliveira 2018-10-20 03:07:05 -04:00 committed by Bernd Bestel
parent 0e723a0a9b
commit f13abf483e

View File

@ -44,7 +44,9 @@ class BaseController
try { try {
$usersService = new UsersService(); $usersService = new UsersService();
$container->view->set('userSettings', $usersService->GetUserSettings(GROCY_USER_ID)); if (defined('GROCY_USER_ID')) {
$container->view->set('userSettings', $usersService->GetUserSettings(GROCY_USER_ID));
}
} }
catch (\Exception $ex) catch (\Exception $ex)
{ {