Skip to content

Commit 2d4f61d

Browse files
Adds 0-price fallback for null price
1 parent e0f4eda commit 2d4f61d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Block/Catalog/Product/ViewedProduct.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ public function getPrice()
148148
}
149149

150150
if (!$this->price) {
151-
// as a fallback, return null
152-
return null;
151+
// as a fallback, return 0 in consistent format
152+
return number_format(0, 2);
153153
}
154154

155155

0 commit comments

Comments
 (0)