Skip to content

Commit 18839b3

Browse files
authored
Merge pull request #679 from ivanhrytsaim/Column-publish_time-in-where-clause-is-ambiguous
PHP8.4 Column 'publish_time' in where clause is ambiguous
2 parents 917cd38 + 6c5883e commit 18839b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Model/ResourceModel/Post/Collection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ public function addCategoryFilter($category)
354354
public function addArchiveFilter($year, $month)
355355
{
356356
$this->getSelect()
357-
->where('YEAR(publish_time) = ?', $year);
357+
->where('YEAR(main_table.publish_time) = ?', $year);
358358
if ($month) {
359-
$this->getSelect()->where('MONTH(publish_time) = ?', $month);
359+
$this->getSelect()->where('MONTH(main_table.publish_time) = ?', $month);
360360
}
361361

362362
return $this;

0 commit comments

Comments
 (0)