Skip to content

Commit 6d00d69

Browse files
authored
Update Collection.php
1 parent d1d72f7 commit 6d00d69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Model/ResourceModel/Post/Collection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ public function addCategoryFilter($category)
352352
*/
353353
public function addArchiveFilter($year, $month)
354354
{
355-
$this->getSelect()
356-
->where('YEAR(publish_time) = ?', $year);
355+
$this->getSelect()
356+
->where('YEAR(main_table.publish_time) = ?', $year);
357357
if ($month) {
358-
$this->getSelect()->where('MONTH(publish_time) = ?', $month);
358+
$this->getSelect()->where('MONTH(main_table.publish_time) = ?', $month);
359359
}
360360

361361
return $this;

0 commit comments

Comments
 (0)