Replace deprecated method.

This commit is contained in:
James Cole
2022-03-27 20:24:13 +02:00
parent 8ee4c2ea11
commit cbf14f541c
39 changed files with 140 additions and 123 deletions

View File

@@ -50,7 +50,10 @@ class FrontpageController extends Controller
$amount = $repository->getCurrentAmount($piggyBank);
if (1 === bccomp($amount, '0')) {
// percentage!
$pct = round(($amount / $piggyBank->targetamount) * 100);
$pct = 0;
if(0.0 !== (float)$piggyBank->targetamount) {
$pct = round(($amount / $piggyBank->targetamount) * 100);
}
$entry = [
'id' => $piggyBank->id,

View File

@@ -163,7 +163,7 @@ class RecurrenceController extends Controller
$dayOfWeek = (string)trans(sprintf('config.dow_%s', $date->dayOfWeekIso));
$ndom = sprintf('ndom,%s,%s', $date->weekOfMonth, $date->dayOfWeekIso);
$yearly = sprintf('yearly,%s', $date->format('Y-m-d'));
$yearlyDate = $date->formatLocalized((string)trans('config.month_and_day_no_year', [], $locale));
$yearlyDate = $date->isoFormat((string)trans('config.month_and_day_no_year_js', [], $locale));
$result = [
'daily' => ['label' => (string)trans('firefly.recurring_daily'), 'selected' => str_starts_with($preSelected, 'daily')],
$weekly => ['label' => (string)trans('firefly.recurring_weekly', ['weekday' => $dayOfWeek]),