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

[PHP 8.4] Warning: foreach() argument must be of type array|object, string given #4318

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

addison74
Copy link
Contributor

This PR fixes issue #4312.

Warning: foreach() argument must be of type array|object, string given
@github-actions github-actions bot added Template : admin Relates to admin template Component: Adminhtml Relates to Mage_Adminhtml Component: Widget Relates to Mage_Widget labels Oct 27, 2024
@addison74 addison74 added the 3rd-party Related to 3rd-party code or issues with customization label Oct 27, 2024
@sreichel
Copy link
Contributor

sreichel commented Oct 27, 2024

Can u please add a debug breakpoint + trace here ... it should be an array ...

Mage_Adminhtml_Block_Widget_Grid::getMultipleRows()

    /**
     * Get children of specified item
     *
     * @param Varien_Object $item
     * @return array
     */
    public function getMultipleRows($item)
    {
        return $item->getChildren();
    }

@sreichel sreichel added the PHP 8 Related to PHP8 label Oct 27, 2024
@addison74
Copy link
Contributor Author

I just debugged the code.

$_multipleRows which stores the function return is a string with this value "10,11,12,13".

@sreichel
Copy link
Contributor

sreichel commented Dec 7, 2024

Can you pla add stack trace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party Related to 3rd-party code or issues with customization Component: Adminhtml Relates to Mage_Adminhtml Component: Widget Relates to Mage_Widget PHP 8 Related to PHP8 Template : admin Relates to admin template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants