-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Adobe CommerceThe issue related to the Adobe Commerce(EE) or B2B functionalityThe issue related to the Adobe Commerce(EE) or B2B functionalityArea: FrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.1Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Description
Hi, so we have this:
- This observer: Magento\PricePermissions\Observer\AdminhtmlBlockHtmlBeforeObserver::execute method have this part of code:
/** @var $block Template */
$block = $observer->getBlock();
$this->_filterByBlockName($block);
// Handle prices that are shown when admin reviews customers shopping cart
if (stripos($block->getNameInLayout(), 'customer_cart_') === 0) {
- The $block::getNameInLayout method is marked with annotation @return string. However, it can return NULL as well which can trigger an issue on php8 in stripos function.
My issue:
I'm using a 3rd party module that adds Tabs in it's admin form and I am thinking of adding this condition in AdminhtmlBlockHtmlBeforeObserver::execute :
if (!$block->getNameInLayout()) {
return;
}
I don't think there is a reason to check anything in that observer if the block name is missing. (even if it's empty string).
Either that, either if the block name is not intended to be NULL update the getNameInLayout() to return only string.
IlyaZha
Metadata
Metadata
Assignees
Labels
Adobe CommerceThe issue related to the Adobe Commerce(EE) or B2B functionalityThe issue related to the Adobe Commerce(EE) or B2B functionalityArea: FrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.1Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it