friends-of-presta / fop_console

Prestashop Module providing a set of shell/terminal commands for developers (PrestaShop 1.7.5+)
Academic Free License v3.0
84 stars 35 forks source link

fop:product:latest crash if there's no new product in the shop #209

Closed SebSept closed 2 years ago

SebSept commented 2 years ago

Describe the bug

Type error: Argument 1 passed to FOP\Console\Commands\Product\ProductLatest::formatProductInformation() must be of the type array, boolean given, called in /.../PrestaShop-1.7.5.x/modules/fop_console/src/Commands/Product/ProductLatest.php on line 51  

Fop Console Version

Fop console version

Prestashop Version

1.7.5

Php Version

Your server php version (7.2+)

SebSept commented 2 years ago

This is because Product::getNewProducts(1); returns 'false' when there's no new products.