cancel
Showing results for 
Search instead for 
Did you mean: 

magento 2.4.5 installation error

magento 2.4.5 installation error

Hi,

 

Hi I am getting an error during installation.
magento version: 2.4.5-p1
composer: 2.5.1
ubuntu 22
nginx 1.18.0
php 8.1
all php extensions are installed
command run:
bin/magento setup:install \
--base-url=http://123.123.123.123 \
--db-host=localhost \
--db-name=magento \
--db-user=magento \
--db-password="U274eeGzNCqKJ2LpvtS@329" \
--admin-firstname=bob \
--admin-lastname=smith \
--admin-email=bob@example.com \
--admin-user=bob \
--admin-password=example@123 \
--language=en_US \
--currency=GBP \
--timezone=Europe/London \
--use-rewrites=1

here is the error:
array_merge(): Argument #2 must be of type array, string given#0 /var/www/html/setup/src/Magento/Setup/Model/ConfigModel.php(157): array_merge()
#1 /var/www/html/setup/src/Magento/Setup/Console/Command/InstallCommand.php(273): Magento\Setup\Model\ConfigModel->validate()
#2 /var/www/html/vendor/symfony/console/Command/Command.php(221): Magento\Setup\Console\Command\InstallCommand->initialize()
#3 /var/www/html/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run()
#4 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand()
#5 /var/www/html/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#6 /var/www/html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#7 /var/www/html/bin/magento(23): Symfony\Component\Console\Application->run()
#8 {main}

please help

1 REPLY 1

Re: magento 2.4.5 installation error

This error message is indicating that the second argument passed to the function "array_merge() "  is not an array, but instead it is a string. This function is used to merge multiple arrays into one.

The error is occurring in the "validate ()" method of the 'configModel' class located at 

'/var/www/html/setup/src/magento/setup/model/configmodel.php ' on line 157. To resolve the issue you need to find out where this string is coming from and convert it into an array before passing it to 'array_merge()'

HERES WHAT YOU CAN TRY

1.check the parameters passed to the 'array_merge' function.

2. look for any code that might be modifying the input data before it is passed to the 'array_merge'

3. check if the correct data types are being passed into the function.