[Skip to main content](#vessel-content)

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

##

- **[sashau](/forum/user/26276-sashau "View sashau's Profile")**
- [![sashau's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/26276-sashau "View sashau's Profile") Topic Author
- [ Offline](/forum/user/26276-sashau)

Less More

- Posts: 15
- Thank you received: 0
-
-

9 years 5 months ago [\#269493](#269493) by [sashau](/forum/user/26276-sashau "View sashau's Profile")  *[Product Mass Action works with PHP 5.6, but not with PHP 7](/forum/3-bug-report/890242-product-mass-action-works-with-php-5-6-but-not-with-php-7#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:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;product.php on line 144  Notice: Array to string conversion in C:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;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&#95;weight depending on the chosen Postage Group  This works as expected on a server with PHP 5.6 and applies the correct product&#95;weight to the product.  With PHP 7 (I tried 7.0.19 and 7.1.5) it always sets the product&#95;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&#95;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:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;product.php on line 144  Notice: Array to string conversion in C:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;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 .  Thank you")* was created by *[sashau](/forum/user/26276-sashau "View sashau's Profile")*

-- 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).
[ ![custom-field.jpg](/forum/attachment/38121) ](/forum/attachment/38121 "custom-field.jpg")

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
[ ![mass-actions.jpg](/forum/attachment/38122) ](/forum/attachment/38122 "mass-actions.jpg")

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.

[ ![debug-db.jpg](/forum/attachment/38123) ](/forum/attachment/38123 "debug-db.jpg")

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](https://www.hikashop.com/forum/mass-actions/888774-mass-action-only-works-manual.html#265747).

Thank you

- [ ![custom-field.jpg](/forum/attachment/38121) ](/forum/attachment/38121 "custom-field.jpg") [ ](/forum/attachment/38121?download=1 "custom-field.jpg")
- [ ![mass-actions.jpg](/forum/attachment/38122) ](/forum/attachment/38122 "mass-actions.jpg") [ ](/forum/attachment/38122?download=1 "mass-actions.jpg")
- [ ![debug-db.jpg](/forum/attachment/38123) ](/forum/attachment/38123 "debug-db.jpg") [ ](/forum/attachment/38123?download=1 "debug-db.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTAyNDItcHJvZHVjdC1tYXNzLWFjdGlvbi13b3Jrcy13aXRoLXBocC01LTYtYnV0LW5vdC13aXRoLXBocC03P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

9 years 5 months ago [\#269957](#269957) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product Mass Action works with PHP 5.6, but not with PHP 7](/forum/3-bug-report/890242-product-mass-action-works-with-php-5-6-but-not-with-php-7#269957 "-- 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:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;product.php on line 144  Notice: Array to string conversion in C:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;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&#95;weight depending on the chosen Postage Group  This works as expected on a server with PHP 5.6 and applies the correct product&#95;weight to the product.  With PHP 7 (I tried 7.0.19 and 7.1.5) it always sets the product&#95;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&#95;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:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;product.php on line 144  Notice: Array to string conversion in C:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;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 .  Thank you")*

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](/forum/user/26276-sashau "View sashau's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTAyNDItcHJvZHVjdC1tYXNzLWFjdGlvbi13b3Jrcy13aXRoLXBocC01LTYtYnV0LW5vdC13aXRoLXBocC03P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sashau](/forum/user/26276-sashau "View sashau's Profile")**
- [![sashau's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/26276-sashau "View sashau's Profile") Topic Author
- [ Offline](/forum/user/26276-sashau)

Less More

- Posts: 15
- Thank you received: 0
-
-

9 years 5 months ago [\#269981](#269981) by [sashau](/forum/user/26276-sashau "View sashau's Profile")  Replied by *[sashau](/forum/user/26276-sashau "View sashau's Profile")* on topic *[Product Mass Action works with PHP 5.6, but not with PHP 7](/forum/3-bug-report/890242-product-mass-action-works-with-php-5-6-but-not-with-php-7#269981 "-- 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:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;product.php on line 144  Notice: Array to string conversion in C:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;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&#95;weight depending on the chosen Postage Group  This works as expected on a server with PHP 5.6 and applies the correct product&#95;weight to the product.  With PHP 7 (I tried 7.0.19 and 7.1.5) it always sets the product&#95;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&#95;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:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;product.php on line 144  Notice: Array to string conversion in C:&#92;laragon&#92;www&#92;mrbs&#92;plugins&#92;hikashop&#92;massaction&#95;product&#92;massaction&#95;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 .  Thank you")*

Thank you, that fixed the problem I was having.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTAyNDItcHJvZHVjdC1tYXNzLWFjdGlvbi13b3Jrcy13aXRoLXBocC01LTYtYnV0LW5vdC13aXRoLXBocC03P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.101 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
