Skip to content

Commit e9dd493

Browse files
authored
Update TopMenu.php
Function _columnBrake return null when limit is smaller then $total. But _getHtml needs the result to be array.
1 parent 60ea2be commit e9dd493

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Theme/Block/Html/Topmenu.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ protected function _countItems($items)
133133
*
134134
* @param Menu $items
135135
* @param int $limit
136-
* @return array|void
136+
* @return array
137137
*
138138
* @todo: Add Depth Level limit, and better logic for columns
139139
*/
140140
protected function _columnBrake($items, $limit)
141141
{
142142
$total = $this->_countItems($items);
143143
if ($total <= $limit) {
144-
return;
144+
return [];
145145
}
146146

147147
$result[] = ['total' => $total, 'max' => (int)ceil($total / ceil($total / $limit))];

0 commit comments

Comments
 (0)