I noticed this warning in my PHP error logs today:
PHP Warning: Division by zero in /Users/connorshea/code/sites/SuiteCRM/include/ListView/ListViewSmarty.php on line 145
Because of the change in 8f0701459e0cd448fc2e2d1546df065fd173ef97, the $adjustment variable can now be 0, which makes $this->displayColumns[$name]['width'] = floor(((int)$this->displayColumns[$name]['width']) / $adjustment); create a division-by-zero error.
No division by zero.
PHP Warning: Division by zero in /Users/connorshea/code/sites/SuiteCRM/include/ListView/ListViewSmarty.php on line 145
Change this:
$this->displayColumns[$name]['width'] = floor(((int)$this->displayColumns[$name]['width']) / $adjustment);
to this:
if ($adjustment === 0) {
$this->displayColumns[$name]['width'] = 0;
} else {
$this->displayColumns[$name]['width'] = floor(((int)$this->displayColumns[$name]['width']) / $adjustment);
}
Warnings are annoying :)
I think the reason this occurs on the OAuth clients/tokens page specifically is because there are no widths defined, so it'd work for any module with columns that have no explicit width:
Hey! I'd like to work on that if it's ok with you. :)
@Kishlin go for it!
Messed up with the branches a bit but PR is now up. :D
https://github.com/salesagility/SuiteCRM/pull/7950
This should be marked as 'resolved in next release'
This is resolved now.