Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non active module dependency throws TypeError in PHP 8+ #3714

Closed
Tomasz-Silpion opened this issue Dec 29, 2023 · 0 comments · Fixed by #3715
Closed

Non active module dependency throws TypeError in PHP 8+ #3714

Tomasz-Silpion opened this issue Dec 29, 2023 · 0 comments · Fixed by #3715
Labels

Comments

@Tomasz-Silpion
Copy link
Contributor

Tomasz-Silpion commented Dec 29, 2023

Preconditions (*)

  1. Any recent version of OpenMage including main branch.
  2. Non active module that depends on non existing module.
  3. PHP 8.0 or any newer version throwing TypeError for non-array arguments in array_merge().

Steps to reproduce (*)

  1. Install recent version of OpenMage
  2. In app/etc/modules folder create Vendor_Module.xml with following content:
<?xml version="1.0"?>
<config>
    <modules>
        <Vendor_Module>
            <active>false</active>
            <codePool>local</codePool>
            <depends>
                <Other_Module/>
            </depends>
        </Vendor_Module>
    </modules>
</config>
  1. Flush cache if it is enabled.

Expected result (*)

  1. No error is thrown, there's no change to the store behavior.
  2. Unless module file <active> tag is not set to true Module "Vendor_Module" requires module "Other_Module" exception does not appear.

Actual result (*)

1. Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in app/code/core/Mage/Core/Model/Config.php:940.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant