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? Commented Jun 7, 2021 at 21:24

1 Answer 1


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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.