Product Mass Action works with PHP 5.6, but not with PHP 7

  • Posts: 15
  • Thank you received: 0
6 years 11 months ago #269493

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.0
-- PHP version -- : 7.1
-- Error-message(debug-mod must be tuned on) -- : Notice: Array to string conversion in C:\laragon\www\mrbs\plugins\hikashop\massaction_product\massaction_product.php on line 144

Notice: Array to string conversion in C:\laragon\www\mrbs\plugins\hikashop\massaction_product\massaction_product.php on line 805

I have a product custom field set up for Postage Group (single dropdown).



I then have a Mass Action set up for each Postage Group so that when a product is updated or created it will specify a product_weight depending on the chosen Postage Group


This works as expected on a server with PHP 5.6 and applies the correct product_weight to the product.

With PHP 7 (I tried 7.0.19 and 7.1.5) it always sets the product_weight to the weight specified in the most recently created Mass Action (regardless of the Postage Group I set.) I investigated further by enabling Debug mode in Joomla and noticed that it performs all of the Mass Actions update queries instead of only the one based on the filtering of the Postage Group.



When enabling error_reporting the following notices show up when saving a product in PHP 7, but not in 5.6 (I'm not sure if it is relevant to this issue though):

Notice: Array to string conversion in C:\laragon\www\mrbs\plugins\hikashop\massaction_product\massaction_product.php on line 144

Notice: Array to string conversion in C:\laragon\www\mrbs\plugins\hikashop\massaction_product\massaction_product.php on line 805

At the moment I have downgraded to PHP 5.6 to get around the issue. Could you look into it for PHP 7? I think someone else has had a similar issue .

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
6 years 10 months ago #269957

Hi,

Please download the install package on our website and install it on yours and that will add a patch which will fix the notice messages. It should also help with the fact that it doesn't work for you as it is working for me with that patch.

The following user(s) said Thank You: sashau

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
6 years 10 months ago #269981

Thank you, that fixed the problem I was having.

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum