Skip to content

Commit 5813139

Browse files
authored
Merge pull request #911 from pupi1985/patch-146
Fix #898: error while adding categories in PHP 8
2 parents f33611d + a992834 commit 5813139

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

qa-include/pages/admin/admin-categories.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@
480480

481481
else {
482482
$positionvalue = isset($previous) ? qa_lang_html_sub('admin/after_x', qa_html($previous['title'])) : qa_lang_html('admin/first');
483-
$positionoptions[1 + @max(array_keys($positionoptions))] = $positionvalue;
483+
$index = empty($positionoptions) ? 0 : max(array_keys($positionoptions));
484+
$positionoptions[1 + $index] = $positionvalue;
484485
}
485486

486487
$qa_content['form']['fields']['position'] = array(

0 commit comments

Comments
 (0)