Hello All,
Last 1 week or so my prestashop e-comm which is on 1.7.6.4, all of the payments via payment gateway is successful however when it has to return to create the order customer gets a 500 error, in few cases the order got created, in most cases order wasnt created, in most cases the cart still had the order intact, in few cases it wasnt in the cart.
The issue was observed with both the payment gateway we have so there is nothing wrong there. When i checked with my hosting provider they asked me to check the below PHP errors
PHP Warning: Invalid argument supplied for foreach() in /home/finsngne/public_html/src/Adapter/Presenter/Product/ProductLazyArray.php on line 310
Relevant content in the file below -
309 {
310 foreach ($this->product['attachments'] as &$attachment) {
311 if (!isset($attachment['file_size_formatted'])) {
312 $attachment['file_size_formatted'] = Tools::formatBytes($attachment['file_size'], 2);
313 }
314 }