Skip to content

Commit 3caf9ad

Browse files
committed
Fix some reported issues
1 parent cc8f8bc commit 3caf9ad

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public function saved()
222222
);
223223

224224
if ($this->formAction === 'create') {
225+
\assert(isset($group));
225226
(new LabelGroupEditor($group))->update(['groupName' => $languageItem]);
226227
} else {
227228
(new LabelGroupEditor($this->formObject))->update(['groupName' => $languageItem]);

wcfsetup/install/files/lib/data/label/group/ViewableLabelGroup.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function sortLabelsAlphabetically(): void
275275
$this->labels,
276276
static fn(Label $a, Label $b) => $collator->compare($a->getTitle(), $b->getTitle())
277277
);
278-
$this->indexToObject = \array_values(\array_keys($this->labels));
278+
$this->indexToObject = \array_keys($this->labels);
279279
}
280280

281281
/**

wcfsetup/install/files/lib/system/cache/builder/LabelCacheBuilder.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ protected function rebuild(array $parameters)
4848

4949
// assign permissions for each label group
5050
foreach ($data['groups'] as $groupID => $group) {
51+
// @phpstan-ignore function.impossibleType, instanceof.alwaysFalse
5152
\assert($group instanceof ViewableLabelGroup);
5253

5354
// group permissions

0 commit comments

Comments
 (0)