Skip to content

Commit a992834

Browse files
committed
Fix error while adding categories in PHP 8
1 parent 2cf739b commit a992834

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)