- Posts: 366
- Thank you received: 26
Error on checkout in PHP8
4 years 9 months ago #338014
by Thrane
Error on checkout in PHP8 was created by Thrane
-- url of the page with the problem -- :
tasteofport.dk/shop/kurv
-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.4
-- PHP version -- : 8.0
Hi
Just tried switching to PHP8, but when I want to check out, I get an error:
current(): Argument #1 ($array) must be of type array, null given
Any advice?
Regards
Thomas
-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.4
-- PHP version -- : 8.0
Hi
Just tried switching to PHP8, but when I want to check out, I get an error:
current(): Argument #1 ($array) must be of type array, null given
Any advice?
Regards
Thomas
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338016
by nicolas
Replied by nicolas on topic Error on checkout in PHP8
Hi,
First, activate the "debug system" setting of the Joomla configuration. Then, reproduce the error. It will give more information which will help us understand what's going on so that we can tell you what to do.
First, activate the "debug system" setting of the Joomla configuration. Then, reproduce the error. It will give more information which will help us understand what's going on so that we can tell you what to do.
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338047
by Thrane
Replied by Thrane on topic Error on checkout in PHP8
Thanks, I have set it to Development, but I don't see more info?
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338051
by nicolas
Replied by nicolas on topic Error on checkout in PHP8
Hi,
The the "debug system" setting is a "yes/no" choice, not a dropdown. You must not be looking at the correct setting.
Please check again.
The the "debug system" setting is a "yes/no" choice, not a dropdown. You must not be looking at the correct setting.
Please check again.
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338057
by Thrane
Replied by Thrane on topic Error on checkout in PHP8
Sorry, got it mixed up with Error Reporting ...
Now I see this:
current(): Argument #1 ($array) must be of type array, null given
/var/www/vhosts/tasteofport.dk/httpdocs/plugins/hikashop/awocoupon/awocoupon.php:208
Call stack
# Function Location
1 () JROOT/plugins/hikashop/awocoupon/awocoupon.php:208
2 current() JROOT/plugins/hikashop/awocoupon/awocoupon.php:208
3 plgHikashopAwoCoupon->onHikashopAfterDisplayView() JROOT/libraries/joomla/event/event.php:70
4 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
5 JEventDispatcher->trigger() JROOT/libraries/src/Application/BaseApplication.php:108
6 Joomla\CMS\Application\BaseApplication->triggerEvent() JROOT/administrator/components/com_hikashop/helpers/helper.php:2608
7 hikashopView->display() JROOT/components/com_hikashop/views/checkout/view.html.php:53
8 CheckoutViewCheckout->display() JROOT/libraries/src/MVC/Controller/BaseController.php:664
9 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2308
10 hikashopController->display() JROOT/components/com_hikashop/controllers/checkout.php:65
11 checkoutController->display() JROOT/components/com_hikashop/controllers/checkout.php:213
12 checkoutController->show() JROOT/libraries/src/MVC/Controller/BaseController.php:702
13 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2286
14 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:88
15 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
16 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
17 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
18 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
19 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
20 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
Now I see this:
current(): Argument #1 ($array) must be of type array, null given
/var/www/vhosts/tasteofport.dk/httpdocs/plugins/hikashop/awocoupon/awocoupon.php:208
Call stack
# Function Location
1 () JROOT/plugins/hikashop/awocoupon/awocoupon.php:208
2 current() JROOT/plugins/hikashop/awocoupon/awocoupon.php:208
3 plgHikashopAwoCoupon->onHikashopAfterDisplayView() JROOT/libraries/joomla/event/event.php:70
4 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
5 JEventDispatcher->trigger() JROOT/libraries/src/Application/BaseApplication.php:108
6 Joomla\CMS\Application\BaseApplication->triggerEvent() JROOT/administrator/components/com_hikashop/helpers/helper.php:2608
7 hikashopView->display() JROOT/components/com_hikashop/views/checkout/view.html.php:53
8 CheckoutViewCheckout->display() JROOT/libraries/src/MVC/Controller/BaseController.php:664
9 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2308
10 hikashopController->display() JROOT/components/com_hikashop/controllers/checkout.php:65
11 checkoutController->display() JROOT/components/com_hikashop/controllers/checkout.php:213
12 checkoutController->show() JROOT/libraries/src/MVC/Controller/BaseController.php:702
13 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2286
14 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:88
15 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
16 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
17 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
18 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
19 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
20 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338060
by nicolas
Replied by nicolas on topic Error on checkout in PHP8
Hi,
The error comes from an AWOCoupon plugin.
So you need to contact the developer of AWOCoupon to report that error to them. They'll be able to fix it and give you a solution.
The error comes from an AWOCoupon plugin.
So you need to contact the developer of AWOCoupon to report that error to them. They'll be able to fix it and give you a solution.
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338070
by Thrane
Replied by Thrane on topic Error on checkout in PHP8
Thank you, will do that right away!
Please Log in or Create an account to join the conversation.
4 years 9 months ago #338078
by Thrane
Replied by Thrane on topic Error on checkout in PHP8
If others get this error, this is the fix from AwoCoupon:
In /plugins/hikashop/awocoupon/awocoupon.php at line 204 is this:
Right after that add this
In /plugins/hikashop/awocoupon/awocoupon.php at line 204 is this:
Code:
<?php
$coupon_session = AC()->storediscount->get_coupon_session();
?>
Right after that add this
Code:
<?php
if ( empty( $coupon_session ) ) {
return;
}
?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.210 seconds