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

#   paypal plugin error

##

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

Less More

- Posts: 28
- Thank you received: 1
-
-

2 years 7 months ago [\#360498](#360498) by [highstat@highstat.com](/forum/user/70596-highstat-highstat-com "View highstat@highstat.com's Profile")  *[paypal plugin error](/forum/29-payment-methods/908071-paypal-plugin-error#360498 "-- HikaShop version -- : 5.0.4 -- Joomla version -- : 4.4.4 -- PHP version -- : 8.1.28 -- Browser(s) name and version -- : Any browser -- Error-message(debug-mod must be tuned on) -- : 0 array&#95;search(): Argument #2 ($haystack) must be of type array, string given Call stack # Function Location 1 () JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:1371 2 array&#95;search() JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:1371 3 plgHikashoppaymentPaypalcheckout-&gt;loadJS() JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:410 4 plgHikashoppaymentPaypalcheckout-&gt;onAfterOrderConfirm() JROOT/administrator/components/com&#95;hikashop/classes/order.php:969 5 hikashopOrderClass-&gt;createFromCart() JROOT/components/com&#95;hikashop/controllers/checkout.php:699 6 checkoutController-&gt;confirm() JROOT/libraries/src/MVC/Controller/BaseController.php:693 7 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/helpers/helper.php:2555 8 hikashopController-&gt;execute() JROOT/components/com&#95;hikashop/hikashop.php:88 9 require&#95;once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 10 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher::Joomla&#92;CMS&#92;Dispatcher&#92;{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 11 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher-&gt;dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361 12 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:208 13 Joomla&#92;CMS&#92;Application&#92;SiteApplication-&gt;dispatch() JROOT/libraries/src/Application/SiteApplication.php:249 14 Joomla&#92;CMS&#92;Application&#92;SiteApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:293 15 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;execute() JROOT/includes/app.php:61 16 require&#95;once() JROOT/index.php:32  Hello,  The Hikashop paypal plugin (HikaShop Paypal Checkout plugin) on my site doesn't work anymore.  It used to work without any problems. I updated Joomla from 4.4.2 to 4.4.4 a couple of weeks ago, and also Hikashop. The PHP version hasn't changed.  I now get an &quot;array&#95;search(): Argument #2 ($haystack) must be of type array, string given &quot; error when clicking on the &quot;Finish: button on my website (before being transferred to Paypal).  Any ideas?  Alain  This is what I get if I out the full debug output in ChatGPT  The error message you're encountering, &#96;0 array&#95;search(): Argument #2 ($haystack) must be of type array, string given&#96;, indicates a type mismatch issue in the PHP code of the PayPal plugin for Hikashop in Joomla. This error occurs because the &#96;array&#95;search()&#96; function expects its second argument (&#96;$haystack&#96;) to be an array, but instead, it received a string.  Here's a breakdown of the issue based on the call stack you provided:  - &#42;&#42;Location of the Error&#42;&#42;: The problem originates from the &#96;paypalcheckout.php&#96; file in the PayPal plugin for Hikashop at line 1371. - &#42;&#42;Function Call Sequence&#42;&#42;: The error is triggered during a sequence of method calls leading up to &#96;array&#95;search()&#96;. The &#96;onAfterOrderConfirm()&#96; function from &#96;paypalcheckout.php&#96; (line 410) calls &#96;loadJS()&#96;, which at line 1371 attempts to use &#96;array&#95;search()&#96;. - &#42;&#42;Description of the Problem&#42;&#42;: The &#96;loadJS()&#96; function seems to be looking for a specific value in an array, but instead of an array, a string is provided, which causes PHP to throw a type error.  ### How to Resolve This Issue:  1. &#42;&#42;Examine the Code&#42;&#42;: Open the file &#96;JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php&#96; and go to line 1371 to see what is being passed to &#96;array&#95;search()&#96;. You need to understand whether the variable that should be an array is being incorrectly set as a string somewhere in the code.  2. &#42;&#42;Debug the Variables&#42;&#42;: Add debugging statements before line 1371 to print out the variable that should be an array. This can help determine why it's a string. For instance: &#96;&#96;&#96;php var&#95;dump($variable); // Replace &#96;$variable&#96; with the actual variable name used in &#96;array&#95;search()&#96; die(); // to stop further execution and observe the variable's content &#96;&#96;&#96;  3. &#42;&#42;Check Data Sources&#42;&#42;: If the variable is set based on some data fetched from elsewhere (like a database or an API response), ensure that the data fetching and handling logic correctly interprets and formats the data as an array.  4. &#42;&#42;Update the Plugin/Contact Support&#42;&#42;: If this is a plugin you downloaded or purchased, check for any updates that might fix this issue, or contact the support for the plugin. It's possible that this is a known issue with a solution already available.  5. &#42;&#42;Patch the Code Temporarily&#42;&#42;: If you're comfortable with PHP, you can attempt to modify the code to ensure the variable is an array. For example: &#96;&#96;&#96;php if (!is&#95;array($variable)) { $variable = explode(',', $variable); // Convert string to array if it's a comma-separated string } &#96;&#96;&#96; This is just an example and may need to be adapted based on the actual content and purpose of the variable.  Remember to back up any files before modifying them, and if you're unsure about making changes, consider consulting with a developer familiar with PHP and Joomla.")* was created by *[highstat@highstat.com](/forum/user/70596-highstat-highstat-com "View highstat@highstat.com's Profile")*

-- HikaShop version -- : 5.0.4
-- Joomla version -- : 4.4.4
-- PHP version -- : 8.1.28
-- Browser(s) name and version -- : Any browser
-- Error-message(debug-mod must be tuned on) -- : 0 array_search(): Argument #2 ($haystack) must be of type array, string given
Call stack
\# Function Location
1 () JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:1371
2 array_search() JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:1371
3 plgHikashoppaymentPaypalcheckout-&gt;loadJS() JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:410
4 plgHikashoppaymentPaypalcheckout-&gt;onAfterOrderConfirm() JROOT/administrator/components/com_hikashop/classes/order.php:969
5 hikashopOrderClass-&gt;createFromCart() JROOT/components/com_hikashop/controllers/checkout.php:699
6 checkoutController-&gt;confirm() JROOT/libraries/src/MVC/Controller/BaseController.php:693
7 Joomla\CMS\MVC\Controller\BaseController-&gt;execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2555
8 hikashopController-&gt;execute() JROOT/components/com_hikashop/hikashop.php:88
9 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
10 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
11 Joomla\CMS\Dispatcher\LegacyComponentDispatcher-&gt;dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:208
13 Joomla\CMS\Application\SiteApplication-&gt;dispatch() JROOT/libraries/src/Application/SiteApplication.php:249
14 Joomla\CMS\Application\SiteApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
15 Joomla\CMS\Application\CMSApplication-&gt;execute() JROOT/includes/app.php:61
16 require_once() JROOT/index.php:32

Hello,

The Hikashop paypal plugin (HikaShop Paypal Checkout plugin) on my site doesn't work anymore.

It used to work without any problems. I updated Joomla from 4.4.2 to 4.4.4 a couple of weeks ago, and also Hikashop. The PHP version hasn't changed.

I now get an "array_search(): Argument #2 ($haystack) must be of type array, string given " error when clicking on the "Finish: button on my website (before being transferred to Paypal).

Any ideas?

Alain

This is what I get if I out the full debug output in ChatGPT

The error message you're encountering, &#96;0 array_search(): Argument #2 ($haystack) must be of type array, string given&#96;, indicates a type mismatch issue in the PHP code of the PayPal plugin for Hikashop in Joomla. This error occurs because the &#96;array_search()&#96; function expects its second argument (&#96;$haystack&#96;) to be an array, but instead, it received a string.

Here's a breakdown of the issue based on the call stack you provided:

- **Location of the Error**: The problem originates from the &#96;paypalcheckout.php&#96; file in the PayPal plugin for Hikashop at line 1371.
- **Function Call Sequence**: The error is triggered during a sequence of method calls leading up to &#96;array_search()&#96;. The &#96;onAfterOrderConfirm()&#96; function from &#96;paypalcheckout.php&#96; (line 410) calls &#96;loadJS()&#96;, which at line 1371 attempts to use &#96;array_search()&#96;.
- **Description of the Problem**: The &#96;loadJS()&#96; function seems to be looking for a specific value in an array, but instead of an array, a string is provided, which causes PHP to throw a type error.

\### How to Resolve This Issue:

1. **Examine the Code**: Open the file &#96;JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php&#96; and go to line 1371 to see what is being passed to &#96;array_search()&#96;. You need to understand whether the variable that should be an array is being incorrectly set as a string somewhere in the code.

2. **Debug the Variables**: Add debugging statements before line 1371 to print out the variable that should be an array. This can help determine why it's a string. For instance:
&#96;&#96;&#96;php
var_dump($variable); // Replace &#96;$variable&#96; with the actual variable name used in &#96;array_search()&#96;
die(); // to stop further execution and observe the variable's content
&#96;&#96;&#96;

3. **Check Data Sources**: If the variable is set based on some data fetched from elsewhere (like a database or an API response), ensure that the data fetching and handling logic correctly interprets and formats the data as an array.

4. **Update the Plugin/Contact Support**: If this is a plugin you downloaded or purchased, check for any updates that might fix this issue, or contact the support for the plugin. It's possible that this is a known issue with a solution already available.

5. **Patch the Code Temporarily**: If you're comfortable with PHP, you can attempt to modify the code to ensure the variable is an array. For example:
&#96;&#96;&#96;php
if (!is_array($variable)) {
$variable = explode(',', $variable); // Convert string to array if it's a comma-separated string
}
&#96;&#96;&#96;
This is just an example and may need to be adapted based on the actual content and purpose of the variable.

Remember to back up any files before modifying them, and if you're unsure about making changes, consider consulting with a developer familiar with PHP and Joomla.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDgwNzEtcGF5cGFsLXBsdWdpbi1lcnJvcj90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

2 years 7 months ago [\#360503](#360503) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[paypal plugin error](/forum/29-payment-methods/908071-paypal-plugin-error#360503 "-- HikaShop version -- : 5.0.4 -- Joomla version -- : 4.4.4 -- PHP version -- : 8.1.28 -- Browser(s) name and version -- : Any browser -- Error-message(debug-mod must be tuned on) -- : 0 array&#95;search(): Argument #2 ($haystack) must be of type array, string given Call stack # Function Location 1 () JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:1371 2 array&#95;search() JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:1371 3 plgHikashoppaymentPaypalcheckout-&gt;loadJS() JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:410 4 plgHikashoppaymentPaypalcheckout-&gt;onAfterOrderConfirm() JROOT/administrator/components/com&#95;hikashop/classes/order.php:969 5 hikashopOrderClass-&gt;createFromCart() JROOT/components/com&#95;hikashop/controllers/checkout.php:699 6 checkoutController-&gt;confirm() JROOT/libraries/src/MVC/Controller/BaseController.php:693 7 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/helpers/helper.php:2555 8 hikashopController-&gt;execute() JROOT/components/com&#95;hikashop/hikashop.php:88 9 require&#95;once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 10 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher::Joomla&#92;CMS&#92;Dispatcher&#92;{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 11 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher-&gt;dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361 12 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:208 13 Joomla&#92;CMS&#92;Application&#92;SiteApplication-&gt;dispatch() JROOT/libraries/src/Application/SiteApplication.php:249 14 Joomla&#92;CMS&#92;Application&#92;SiteApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:293 15 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;execute() JROOT/includes/app.php:61 16 require&#95;once() JROOT/index.php:32  Hello,  The Hikashop paypal plugin (HikaShop Paypal Checkout plugin) on my site doesn't work anymore.  It used to work without any problems. I updated Joomla from 4.4.2 to 4.4.4 a couple of weeks ago, and also Hikashop. The PHP version hasn't changed.  I now get an &quot;array&#95;search(): Argument #2 ($haystack) must be of type array, string given &quot; error when clicking on the &quot;Finish: button on my website (before being transferred to Paypal).  Any ideas?  Alain  This is what I get if I out the full debug output in ChatGPT  The error message you're encountering, &#96;0 array&#95;search(): Argument #2 ($haystack) must be of type array, string given&#96;, indicates a type mismatch issue in the PHP code of the PayPal plugin for Hikashop in Joomla. This error occurs because the &#96;array&#95;search()&#96; function expects its second argument (&#96;$haystack&#96;) to be an array, but instead, it received a string.  Here's a breakdown of the issue based on the call stack you provided:  - &#42;&#42;Location of the Error&#42;&#42;: The problem originates from the &#96;paypalcheckout.php&#96; file in the PayPal plugin for Hikashop at line 1371. - &#42;&#42;Function Call Sequence&#42;&#42;: The error is triggered during a sequence of method calls leading up to &#96;array&#95;search()&#96;. The &#96;onAfterOrderConfirm()&#96; function from &#96;paypalcheckout.php&#96; (line 410) calls &#96;loadJS()&#96;, which at line 1371 attempts to use &#96;array&#95;search()&#96;. - &#42;&#42;Description of the Problem&#42;&#42;: The &#96;loadJS()&#96; function seems to be looking for a specific value in an array, but instead of an array, a string is provided, which causes PHP to throw a type error.  ### How to Resolve This Issue:  1. &#42;&#42;Examine the Code&#42;&#42;: Open the file &#96;JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php&#96; and go to line 1371 to see what is being passed to &#96;array&#95;search()&#96;. You need to understand whether the variable that should be an array is being incorrectly set as a string somewhere in the code.  2. &#42;&#42;Debug the Variables&#42;&#42;: Add debugging statements before line 1371 to print out the variable that should be an array. This can help determine why it's a string. For instance: &#96;&#96;&#96;php var&#95;dump($variable); // Replace &#96;$variable&#96; with the actual variable name used in &#96;array&#95;search()&#96; die(); // to stop further execution and observe the variable's content &#96;&#96;&#96;  3. &#42;&#42;Check Data Sources&#42;&#42;: If the variable is set based on some data fetched from elsewhere (like a database or an API response), ensure that the data fetching and handling logic correctly interprets and formats the data as an array.  4. &#42;&#42;Update the Plugin/Contact Support&#42;&#42;: If this is a plugin you downloaded or purchased, check for any updates that might fix this issue, or contact the support for the plugin. It's possible that this is a known issue with a solution already available.  5. &#42;&#42;Patch the Code Temporarily&#42;&#42;: If you're comfortable with PHP, you can attempt to modify the code to ensure the variable is an array. For example: &#96;&#96;&#96;php if (!is&#95;array($variable)) { $variable = explode(',', $variable); // Convert string to array if it's a comma-separated string } &#96;&#96;&#96; This is just an example and may need to be adapted based on the actual content and purpose of the variable.  Remember to back up any files before modifying them, and if you're unsure about making changes, consider consulting with a developer familiar with PHP and Joomla.")*

Hi,

I've made a patch for this.
Download again the install package of the 5.0.4 on our website and install it on yours in order to get the patch.
It should then work properly.

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

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

Less More

- Posts: 28
- Thank you received: 1
-
-

2 years 7 months ago [\#360504](#360504) by [highstat@highstat.com](/forum/user/70596-highstat-highstat-com "View highstat@highstat.com's Profile")  Replied by *[highstat@highstat.com](/forum/user/70596-highstat-highstat-com "View highstat@highstat.com's Profile")* on topic *[paypal plugin error](/forum/29-payment-methods/908071-paypal-plugin-error#360504 "-- HikaShop version -- : 5.0.4 -- Joomla version -- : 4.4.4 -- PHP version -- : 8.1.28 -- Browser(s) name and version -- : Any browser -- Error-message(debug-mod must be tuned on) -- : 0 array&#95;search(): Argument #2 ($haystack) must be of type array, string given Call stack # Function Location 1 () JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:1371 2 array&#95;search() JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:1371 3 plgHikashoppaymentPaypalcheckout-&gt;loadJS() JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php:410 4 plgHikashoppaymentPaypalcheckout-&gt;onAfterOrderConfirm() JROOT/administrator/components/com&#95;hikashop/classes/order.php:969 5 hikashopOrderClass-&gt;createFromCart() JROOT/components/com&#95;hikashop/controllers/checkout.php:699 6 checkoutController-&gt;confirm() JROOT/libraries/src/MVC/Controller/BaseController.php:693 7 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT/administrator/components/com&#95;hikashop/helpers/helper.php:2555 8 hikashopController-&gt;execute() JROOT/components/com&#95;hikashop/hikashop.php:88 9 require&#95;once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 10 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher::Joomla&#92;CMS&#92;Dispatcher&#92;{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 11 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher-&gt;dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361 12 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:208 13 Joomla&#92;CMS&#92;Application&#92;SiteApplication-&gt;dispatch() JROOT/libraries/src/Application/SiteApplication.php:249 14 Joomla&#92;CMS&#92;Application&#92;SiteApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:293 15 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;execute() JROOT/includes/app.php:61 16 require&#95;once() JROOT/index.php:32  Hello,  The Hikashop paypal plugin (HikaShop Paypal Checkout plugin) on my site doesn't work anymore.  It used to work without any problems. I updated Joomla from 4.4.2 to 4.4.4 a couple of weeks ago, and also Hikashop. The PHP version hasn't changed.  I now get an &quot;array&#95;search(): Argument #2 ($haystack) must be of type array, string given &quot; error when clicking on the &quot;Finish: button on my website (before being transferred to Paypal).  Any ideas?  Alain  This is what I get if I out the full debug output in ChatGPT  The error message you're encountering, &#96;0 array&#95;search(): Argument #2 ($haystack) must be of type array, string given&#96;, indicates a type mismatch issue in the PHP code of the PayPal plugin for Hikashop in Joomla. This error occurs because the &#96;array&#95;search()&#96; function expects its second argument (&#96;$haystack&#96;) to be an array, but instead, it received a string.  Here's a breakdown of the issue based on the call stack you provided:  - &#42;&#42;Location of the Error&#42;&#42;: The problem originates from the &#96;paypalcheckout.php&#96; file in the PayPal plugin for Hikashop at line 1371. - &#42;&#42;Function Call Sequence&#42;&#42;: The error is triggered during a sequence of method calls leading up to &#96;array&#95;search()&#96;. The &#96;onAfterOrderConfirm()&#96; function from &#96;paypalcheckout.php&#96; (line 410) calls &#96;loadJS()&#96;, which at line 1371 attempts to use &#96;array&#95;search()&#96;. - &#42;&#42;Description of the Problem&#42;&#42;: The &#96;loadJS()&#96; function seems to be looking for a specific value in an array, but instead of an array, a string is provided, which causes PHP to throw a type error.  ### How to Resolve This Issue:  1. &#42;&#42;Examine the Code&#42;&#42;: Open the file &#96;JROOT/plugins/hikashoppayment/paypalcheckout/paypalcheckout.php&#96; and go to line 1371 to see what is being passed to &#96;array&#95;search()&#96;. You need to understand whether the variable that should be an array is being incorrectly set as a string somewhere in the code.  2. &#42;&#42;Debug the Variables&#42;&#42;: Add debugging statements before line 1371 to print out the variable that should be an array. This can help determine why it's a string. For instance: &#96;&#96;&#96;php var&#95;dump($variable); // Replace &#96;$variable&#96; with the actual variable name used in &#96;array&#95;search()&#96; die(); // to stop further execution and observe the variable's content &#96;&#96;&#96;  3. &#42;&#42;Check Data Sources&#42;&#42;: If the variable is set based on some data fetched from elsewhere (like a database or an API response), ensure that the data fetching and handling logic correctly interprets and formats the data as an array.  4. &#42;&#42;Update the Plugin/Contact Support&#42;&#42;: If this is a plugin you downloaded or purchased, check for any updates that might fix this issue, or contact the support for the plugin. It's possible that this is a known issue with a solution already available.  5. &#42;&#42;Patch the Code Temporarily&#42;&#42;: If you're comfortable with PHP, you can attempt to modify the code to ensure the variable is an array. For example: &#96;&#96;&#96;php if (!is&#95;array($variable)) { $variable = explode(',', $variable); // Convert string to array if it's a comma-separated string } &#96;&#96;&#96; This is just an example and may need to be adapted based on the actual content and purpose of the variable.  Remember to back up any files before modifying them, and if you're unsure about making changes, consider consulting with a developer familiar with PHP and Joomla.")*

Thanks..that works.

Alain

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDgwNzEtcGF5cGFsLXBsdWdpbi1lcnJvcj90bXBsPW1hcmtkb3du) 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.058 seconds

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