0

I have a written individually module for importing products from an .xml file.

To this time all work correct. But today when I try import product then I received error:

php bin/magento offer:product:import
..........
..........
Processing 1834
Processing 1835
PHP Fatal error:  Uncaught Error: Call to a member function addData() on array i                                  n /home/zabezcen/domains/zabezcen.pl/public_html/vendor/pricecomparison/                                  module-price-comparison-offer/Console/Import.php:529
Stack trace:
#0 /home/myuser/domains/domain.com/public_html/vendor/pricecomparison                                  /module-price-comparison-offer/Console/Import.php(379): \PriceComparisonO                                  ffer\Console\Import->processOfferData('20', Array)
#1 /home/myuser/domains/domain.com/public_html/vendor/symfony/console/Command                                  /Command.php(245): \PriceComparisonOffer\Console\Import->execute(Object(S                                  ymfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Outp                                  ut\ConsoleOutput))
#2 /home/myuser/domains/domain.com/public_html/vendor/symfony/console/Applica                                  tion.php(835): Symfony\Component\Console\Command\Command->run(Object(Symfony\Com                                  ponent\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\Console                                  Output))
#3 /home/myuser/domains/domain.com/public_html/vendor/symfony/console/Applica                                  tion.php(185): Sy in /home/zabezcen/domains/zabezcen.pl/public_html/vendor/                                  pricecomparison/module-price-comparison-offer/Console/Import.php on line 529

Import.php on line 529

/* Update exist offer*/
                $oldOffers[$sku]->addData($offerData)->save();
                $validOfferCount ++;
            }else{

Can anyone help me how can I identify this error?

  • Have you changed environment at all? Upgraded php version? – Dominic Xigen Oct 21 '19 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.