Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
FIX #7923 - Verify the variable is an array #7924
Now the Smarty code is 'transformed' into a php file in
<?php if (is_array ( $this->_tpl_vars['ROWS_BUTTONS'][$this->_tpl_vars['rowHeader']] ) && count($this->_tpl_vars['ROWS_BUTTONS'][$this->_tpl_vars['rowHeader']]) > 0): ?>
As we can see if the variable is not an array, we do not count it, avoiding Warnings
How To Test This
Types of changes
This happens when there is no button_row in a subpanel. Sometimes you have subpanels with data retrieved from a WS and there is no action available for the records.
Try removing the row_buttons in, for example, in
- 'edit_button'=>array( - 'vname' => 'LBL_EDIT_BUTTON', - 'widget_class' => 'SubPanelEditButton', - 'module' => 'Opportunities', - 'width' => '4%', - ),
If you do this, you will get this in php log when you refresh (or re-order) the subpanel:
It's very strange, but before (when I opened the issue) the error was slightly different:
I was debuging some hours to find out why the error changed, but I could not find the reason.
Anyway we should check in