Skip to content

Conversation

@sreichel
Copy link
Contributor

Fatal error: Uncaught Error: Call to a member function getIsOldCustomer() on bool

Copilot AI review requested due to automatic review settings November 14, 2025 11:02
@sreichel sreichel added the bug label Nov 14, 2025
@github-actions github-actions bot added Component: Core Relates to Mage_Core Component: Catalog Relates to Mage_Catalog Component: CatalogInventory Relates to Mage_CatalogInventory Component: lib/Varien Relates to lib/Varien Component: Adminhtml Relates to Mage_Adminhtml Component: Index Relates to Mage_Index Component: lib/* Relates to lib/* phpstan labels Nov 14, 2025
@github-actions github-actions bot removed Component: Core Relates to Mage_Core Component: Catalog Relates to Mage_Catalog Component: CatalogInventory Relates to Mage_CatalogInventory Component: lib/Varien Relates to lib/Varien Component: Index Relates to Mage_Index Component: lib/* Relates to lib/* labels Nov 14, 2025
Copilot finished reviewing on behalf of sreichel November 14, 2025 11:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a fatal error caused by calling a method on a non-existent Mage_Adminhtml_Model_Quote class. The changes include removing the problematic code and adding defensive null handling in several locations to prevent similar array key issues in PHP 8.1+.

  • Removes call to non-existent Mage_Adminhtml_Model_Quote in Newsletter block
  • Adds null-to-empty-string conversions for array key lookups to prevent deprecation warnings
  • Adds string casts for array key lookups to ensure consistent key types
  • Removes problematic curl_close call from HTTP adapter
  • Updates PHPStan baseline to reflect resolved issues

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/Varien/Http/Adapter/Curl.php Removes curl_close() call from the close() method
lib/Varien/Data/Collection.php Adds null check to convert null to empty string before array key lookup
app/code/core/Mage/Index/Model/Indexer/Abstract.php Adds null check to convert null to empty string for entity lookup
app/code/core/Mage/Core/Controller/Varien/Router/Standard.php Adds string cast for route name array key lookup
app/code/core/Mage/CatalogInventory/Model/Stock/Status.php Adds string cast for product ID array key lookup
app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php Adds null check to convert null to empty string for product type lookup
app/code/core/Mage/Catalog/Model/Product/Type.php Adds string cast for type ID array key lookup
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php Removes call to non-existent Mage_Adminhtml_Model_Quote class, now always returns empty string
.phpstan.dist.baseline.neon Removes PHPStan baseline entry for the fixed Newsletter.php issue

@sonarqubecloud
Copy link

@sreichel sreichel changed the title Bug: remove call to not existing Mage_Adminhtml_Model_Quote Bug: Call to a member function in Mage_Adminhtml_Model_Quote Nov 14, 2025
@sreichel sreichel merged commit eede9bd into OpenMage:main Nov 16, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Component: Adminhtml Relates to Mage_Adminhtml phpstan

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants