Skip to content

Commit 0d65f41

Browse files
committed
small corrections
1 parent 3d9482f commit 0d65f41

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/Http/Controllers/LabelsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public function create(Request $request, CustomLabelImportValidator $validator)
437437
$label = new PreviewTapeLabel(
438438
width: (float)$validated['label_width'],
439439
height: (float)$validated['label_height'],
440-
labelGap: (float)$validated['label_gap'] ?? 0,
440+
labelGap: (float)($validated['label_gap'] ?? 0),
441441
);
442442
}
443443
$config = $label->toEditorConfig();

app/Http/Controllers/SettingsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,12 +601,12 @@ public function getLabels(): View
601601
if (str_starts_with($setting->label2_template, 'custom:')) {
602602
$customLabelId = (int)str_replace('custom:', '', $setting->label2_template);
603603

604-
$setting->label2_template_name = CustomUserLabel::find($customLabelId)->name
604+
$setting->label2_template_name = CustomUserLabel::find($customLabelId)?->name
605605
?? $setting->label2_template;
606606
}
607607

608608
return view('settings.labels')
609-
->with('setting', Setting::getSettings())
609+
->with('setting', $setting)
610610
->with('is_gd_installed', $is_gd_installed)
611611
->with('customFields', CustomField::where('field_encrypted', '=', 0)->get());
612612
}

0 commit comments

Comments
 (0)