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

Exception in grid handling in order context #4475

Closed
alexh-swdev opened this issue Jan 13, 2025 · 3 comments · Fixed by #4476
Closed

Exception in grid handling in order context #4475

alexh-swdev opened this issue Jan 13, 2025 · 3 comments · Fixed by #4476
Labels
bug confirmed PHP 8.3 Related to PHP 8.3

Comments

@alexh-swdev
Copy link
Contributor

Preconditions (*)

OM Version OM 20.11.0
PHP 8.3

Steps to reproduce (*)

In my case: click on an order

Expected result (*)

It works :)

Actual result (*)

Cannot access offset of type array on array in /app/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php:348
image

Is this probably a side effect of #4225 ?

Is there a check missing in the OM code?
Do I have to adjust some config or adjust the 3rd party code?

The offending call comes from Mirasvit/RMA. It tries to add this colum:

if (in_array('customer_name', $columns)) {
            $this->addColumn('name', array(
                'header' => Mage::helper('rma')->__('Customer Name'),
                'index' => array('firstname', 'lastname'),
                'type' => 'concat',
                'separator' => ' ',
                'filter_index' => new Zend_Db_Expr("CONCAT(firstname, ' ', lastname)"),
                'frame_callback' => array($this, 'filterXss'),
                )
            );
        }
@sreichel
Copy link
Contributor

True.

@alexh-swdev
Copy link
Contributor Author

That was quick! Looks good for me now. (Pages are loading, and sorting and filtering are working)

@sreichel
Copy link
Contributor

Is there a check missing in the OM code?

Yep. Index column with array data was not covered. Thanks.

@sreichel sreichel added the PHP 8.3 Related to PHP 8.3 label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed PHP 8.3 Related to PHP 8.3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants