Support

UNiTE, Remote CLI, eXtract Wizard

#38226 array_merge(): Argument #1 must be of type array, Akeeba\UNiTE\DataShape\SiteInfo given

Posted in ‘UNiTE and Remote CLI’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
8.1.7
Tool
UNiTE
Tool version
5.0.0

Latest post by nicholas on Monday, 16 January 2023 01:36 CST

extly

Hi,

I've updated to Unite 5.0.0 on a local environment with PHP 8.1.7. When I restore a backup with Unite 5, I'm getting this error:

Restoring Akeeba .jpa backup …
Configuring Unite: *.jpa, thesite, /app/www
Configuring Unite DB: thesitedb, thesitedb, thesitedb
Akeeba UNiTE 5.0.0 (2022-10-11)
Copyright ©2008-2022 Nicholas K. Dionysopoulos / Akeeba Ltd.

This program comes with ABSOLUTELY NO WARRANTY. This is Free Software and you
are welcome to redistribute it under certain conditions. Use command license
for details.

 

[INFO ] Parsing /app/www/joomla-unite.xml
[INFO ] Validating the source data
[ERROR ] array_merge(): Argument #1 must be of type array, Akeeba\UNiTE\DataShape\SiteInfo given

In Validator.php line 77:

array_merge(): Argument #1 must be of type array, Akeeba\UNiTE\DataShape\SiteInfo given

 

It looks like a PHP 8 compatibility bug when array_merge receives a parameter with a type mismatch.

Best Regards

nicholas
Akeeba Staff
Manager

Can you please try using this dev release: Version 5.0.1-dev202211030845-rev87303ab. Please let me know if it works for you. I've been looking for someone beside me and Davide to test this before releasing a new version.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

extly

Hi,

Sorry for the delay. I wrote the answer, but I forgot to submit it.

Same issue. If I decompress the phar, it works Ok.

Best Regards

nicholas
Akeeba Staff
Manager

> If I decompress the phar, it works Ok.

This makes no sense. It's the same code, it cannot work differently inside and outside the Phar archive UNLESS you have OPcache enabled without its revalidation cache frequency set to 0. In this case code is cached forever in the OPcache based on its path. Since the path inside the Phar remains the same (it's relative to the Phar root) your version of PHP never sees the change. Clear your OPcache and set it up so it has a non-zero revalidation frequency.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!