Hello,
I have seen another similar post, but without a clear resolution. The context is different too.

I have an AIGA website that is in an old server that is being decommissioned. It is a Joomla 4 website with AIGA and PHP 7.4. It works well. Needless to say that PHP 7.4 has become End-of-Life since 28 Nov 2022 and should not be used in any live site.

In the new server we can choose PHP 8.0, 8.1 or 8.2.
PHP 8.1 and 8.2 throw this error in the backend:
Deprecated
: explode(): Passing null to parameter #2 ($string) of type string is deprecated in
.../public_html/libraries/vendor/joomla/application/src/Web/WebClient.php
on line
406

PHP 8.0 works fine in the backend and does not present this error.

All PHP 8.* versions make AIGA throw the following on the home page:
0
in_array(): Argument #2 ($haystack) must be of type array, null given
Please try one of the following pages:
.../public_html/templates/ja_aiga/tpls/blocks/mainbody.php (16)
Home Page

Joomla and all extensions are updated to their respective latest versions.

Has this issue been resolved? Is AIGA getting an update to become compatible with current versions of PHP?
Happy to edit the template code to fix the problem until an update becomes available if you tell me what to change.

Thanks very much.

Hi

I updated the file: /templates/ja_aiga/tpls/blocks/mainbody.php

Line 16:

if (in_array(JFactory::getApplication()->input->get('Itemid'), $this->getParam('skip_component_content')) && JFactory::getApplication()->input->get('option') != 'com_config')

changed to:

if (is_array($this->getParam('skip_component_content')) && 
  in_array(JFactory::getApplication()->input->getInt('Itemid'), $this->getParam('skip_component_content'))) 

Your site is working now.

Kindly check.

    saguaros

    Awesome.
    Thanks very much.
    What are the chances of publishing a new AIGA release with this template change?
    It is obvious that PHP 8+ is the current standard and all JA templates should be compatible with it.

    Thanks again

    Yes, we will have further testing with PHP 8.1 and release a new version.

      saguaros

      The template is working with PHP 8.1, but Joomla throws out other errors. I'm happy to stick with PHP 8.0 for now and wait the next fixes.

      Thanks again

      For errors from Joomla core files, you will need to check your Joomla update again, it may have issue. Or update latest version for Joomla and see how it goes.

      Write a Reply...
      You need to Login to view replies.