Skip to content

Magento 2.1.0 issue with method "getAreaCode" & "setAreaCode" #6063

Closed
@thietdv-doan

Description

@thietdv-doan

Preconditions

  1. Magento version 2.1.0

Steps to reproduce

  1. Open file "vendor/magento/framework/App/State.php"
  2. Check 2 methods "getAreaCode" (line 136) & "setAreaCode" (line 119)

Expected result

  1. There should be a fix for this 2 methods to allow us to check if "$this->_areaCode" has been set or not then we can set if it has not been set.
  2. But the method "getAreaCode" always throw an exception

Suggestion

  1. Just return null / false if "$this->_areaCode" has not been set instead of throw exception in "getAreaCode" method

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug reportnon-issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions