When I try to install Magento 2.4.1 I get this error
Error happened during deploy process: Notice: Trying to access array offset on the value of type null in /home/609563/public_html/vendor/magento/framework/View/Design/Theme/ThemeList.php on line 254
-
Are you sure this is a vanilla install with no changes? Or does this already have some customization, such as a custom theme?Perry Holden– Perry Holden2021-06-07 21:24:00 +00:00Commented Jun 7, 2021 at 21:24
1 Answer
I would think that you have a theme.xml file that is empty. If you have an empty file, the media information will be a null value. Normally, with PHP 7.3 and earlier, you would not get an error when trying to use a null value as an array. But with PHP 7.4, things like this break code execution.
My recommendation is to view each of your codebase's theme.xml files and ensure that they have a proper structure. Here is an example of what they should look like:
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Magento Blank</title>
<media>
<preview_image>media/preview.jpg</preview_image>
</media>
</theme>