in_array(): Argument #2 ($haystack) must be of type array, null given

Started by Graziano, April 18, 2026, 10:54:43 AM

Previous topic - Next topic

Graziano

Hi I've an error link when to generate category or item >>> see pics
VM 4.6.4
Joomla 5.4.5
PHP 8.4
Site >>> https://magentashop.altervista.org/
see attachment
     0 in_array(): Argument #2 ($haystack) must be of type array, null given

Call Stack
#    Function    Location
1    ()    JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:421
2    in_array()    JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:421
3    shopFunctionsF::renderVendorAddress()    JROOT/components/com_virtuemart/views/vendor/tmpl/bs5-details.php:48
4    include()    JROOT/libraries/src/MVC/View/HtmlView.php:416
5    Joomla\CMS\MVC\View\HtmlView->loadTemplate()    JROOT/components/com_virtuemart/helpers/vmview.php:113
6    VmView->display()    JROOT/components/com_virtuemart/views/vendor/view.html.php:140
7    VirtuemartViewVendor->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:697
8    Joomla\CMS\MVC\Controller\BaseController->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:730
9    Joomla\CMS\MVC\Controller\BaseController->execute()    JROOT/components/com_virtuemart/virtuemart.php:135
10    require_once()    JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
11    Joomla\CMS\Dispatcher\LegacyComponentDispatcher::{closure:Joomla\CMS\Dispatcher\LegacyComponentDispatcher::dispatch():70}()    JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
12    Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()    JROOT/libraries/src/Component/ComponentHelper.php:361
13    Joomla\CMS\Component\ComponentHelper::renderComponent()    JROOT/libraries/src/Application/SiteApplication.php:217
14    Joomla\CMS\Application\SiteApplication->dispatch()    JROOT/libraries/src/Application/SiteApplication.php:271
15    Joomla\CMS\Application\SiteApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:304
16    Joomla\CMS\Application\CMSApplication->execute()    JROOT/includes/app.php:58
17    require_once()    JROOT/index.php:51
--------------------------------------
The problem only occurs with the category sorting and generation
Probably syntax error with PHP 8.4, waiting for advice on how to proceed, I'm a beginner on PHP8 code thanks to anyone who answers
VM 4.6.4 - Joomla 5.4.5 - PHP 8.4
www.magentashop.altervista.org