On a couple different Magento sites, one of them running CE version 18.104.22.168 and the other running CE version 22.214.171.124, I was having trouble exporting even limited selections of the catalog from the System > Import/Export function of the admin. In some cases clearing the cache would resolve the issue, but not always. I increased the PHP memory_limit setting, and that also did not resolve the issue. Finally I checked my PHP error logs and saw an “Unsupported operand types” error message related to the core product export file. Here’s what fixed it on a (so far) permanent basis:
1. Override the core file.
Create a duplicate copy of
and place it in
creating that directory structure within /local/ if need be.
2. Edit the local file.
Open the duplicate copy of product.php which you created in the local directory structure and go to line 876 (in v 126.96.36.199) or line 873 (in v 188.8.131.52) and replace the following line of code:
$dataRow += $stockItemRows[$productId];
$dataRow = array_merge($dataRow,$stockItemRows[$productId]);
And that’s it! Magento will now use the local copy of Product.php instead of the core version and your export command will produce the .csv file you’re looking for, not the blank screen that you hate.
H/T to Roshal Lal for the solution. This is simply an update of his solution for my own records and with updated line numbers.