Skip to content

Commit

Permalink
Eoxia#19 [CompetitorPrice] fix: missing check null value
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Sep 11, 2024
1 parent a68fb94 commit 88adb78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions class/competitorprice.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,10 @@ public function info(int $id): void
/**
* Return average of amount_ht
*
* @param int $fkProductID ID of product
* @return float $average Average of amount_ht
* @param int $fkProductID ID of product
* @return float|null $average Average of amount_ht
*/
public function getAverage(int $fkProductID = 0): float
public function getAverage(int $fkProductID = 0): ?float
{
$sql = 'SELECT AVG(amount_ht) AS moyenne_amount_ht';
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
Expand Down

0 comments on commit 88adb78

Please sign in to comment.