Skip to content

Commit 196f9a0

Browse files
committed
Fix error in PHP8.x
1 parent 1992c65 commit 196f9a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Block/Widget/Categories.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ public function getCategories()
8080
$categories->addAttributeToSort('level');
8181
}elseif($sortAttribute=='custom'){
8282
$custom_sort= $this->getData('custom_sort');
83-
if(preg_match('/^(\d+,)+\d+$/',$custom_sort)){
83+
if(preg_match('/^(\d+,)+\d+$/', (string) $custom_sort)){
8484
$custom_sort_arr = [];
85-
$categoryIds = explode(',',$categoryIds);
85+
$categoryIds = explode(',', (string) $categoryIds);
8686
$custom_sort_arr = explode(',',$custom_sort);
8787
$custom_sort_arr2 = array_merge(array_diff($custom_sort_arr, $categoryIds), array_diff($categoryIds,$custom_sort_arr));
8888
$custom_sort_arr = array_merge($custom_sort_arr,$custom_sort_arr2);

0 commit comments

Comments
 (0)