Fixed PHP warning (fixes #1267)

This commit is contained in:
Bernd Bestel
2021-01-12 10:40:14 +01:00
parent 27169e1428
commit e42f4b405d

View File

@@ -157,7 +157,6 @@ class BaseController
if (GROCY_AUTHENTICATED) if (GROCY_AUTHENTICATED)
{ {
$this->View->set('permissions', User::PermissionList()); $this->View->set('permissions', User::PermissionList());
}
$decimalPlacesAmounts = intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'stock_decimal_places_amounts')); $decimalPlacesAmounts = intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'stock_decimal_places_amounts'));
if ($decimalPlacesAmounts <= 0) if ($decimalPlacesAmounts <= 0)
@@ -169,6 +168,7 @@ class BaseController
$defaultMinAmount = '0.' . str_repeat('0', $decimalPlacesAmounts - 1) . '1'; $defaultMinAmount = '0.' . str_repeat('0', $decimalPlacesAmounts - 1) . '1';
} }
$this->View->set('DEFAULT_MIN_AMOUNT', $defaultMinAmount); $this->View->set('DEFAULT_MIN_AMOUNT', $defaultMinAmount);
}
return $this->View->render($response, $page, $data); return $this->View->render($response, $page, $data);
} }