- Posts: 366
- Thank you received: 26
Error when saving Additional info on order
4 years 9 months ago #338332
by Thrane
Error when saving Additional info on order was created by Thrane
-- HikaShop version -- : 4.4.5
-- Joomla version -- : 3.10.4
-- PHP version -- : 8.0.14
-- Error-message(debug-mod must be tuned on) -- : # Function Location
1 () JROOT/administrator/components/com_hikashop/classes/order.php:1165
2 hikashopOrderClass->saveForm() JROOT/administrator/components/com_hikashop/controllers/order.php:608
3 OrderController->save() JROOT/libraries/src/MVC/Controller/BaseController.php:702
4 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2286
5 hikashopController->execute() JROOT/administrator/components/com_hikashop/hikashop.php:73
6 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
7 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
9 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
10 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51
Hi
When I on an order edit additional info and click save, I get this error and nothing is saved:
Any way to fix this?
Regards
Thomas
-- Joomla version -- : 3.10.4
-- PHP version -- : 8.0.14
-- Error-message(debug-mod must be tuned on) -- : # Function Location
1 () JROOT/administrator/components/com_hikashop/classes/order.php:1165
2 hikashopOrderClass->saveForm() JROOT/administrator/components/com_hikashop/controllers/order.php:608
3 OrderController->save() JROOT/libraries/src/MVC/Controller/BaseController.php:702
4 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2286
5 hikashopController->execute() JROOT/administrator/components/com_hikashop/hikashop.php:73
6 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
7 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
9 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
10 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51
Hi
When I on an order edit additional info and click save, I get this error and nothing is saved:
Code:
An error has occurred.
0 count(): Argument #1 ($value) must be of type Countable|array, string given
Any way to fix this?
Regards
Thomas
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338334
by nicolas
Replied by nicolas on topic Error when saving Additional info on order
Hi,
Thanks for the report.
Change the line:
to:
in the file administrator/components/com_hikashop/classes/order.php and it will fix the problem.
We'll add the fix on our end.
Thanks for the report.
Change the line:
Code:
if( !empty($value) || count($value) > 0 )
Code:
if( !empty($value) || (is_array($value) && count($value) > 0 ))
We'll add the fix on our end.
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338353
by Thrane
Replied by Thrane on topic Error when saving Additional info on order
Works, thanks!
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.226 seconds