Closed newadventure079 closed 2 months ago
New in PHP 8.3:
8.3.0 Now emits E_WARNING when array values cannot be converted to int or float. Previously arrays and objects where ignored whilst every other value was cast to int. Moreover, objects that define a numeric cast (e.g. GMP) are now cast instead of ignored.
Same here, you can work around this by adding pageSummaryFunc in your column setting
Yes this is expected - the default page summary action is to DO A SUMMATION. Your columns to sum must only contain numbers and not strings --- alternatively use a pageSummaryFunc to build your own custom function to summarize.
Prerequisites
master
branch of yii2-dynagrid.Steps to reproduce the issue
'showPageSummary' => true
Expected behavior and actual behavior
This line seems to be the issue:
kartik-v/yii2-grid/src/ColumnTrait.php at line 380– array_sum(['67.57%', '78.73%', '75.34%', '78.63%', ...])
It looks like it's summing the string values for the percentagesI was expecting...
No errors
Logs
Code
Environment
Browsers
Operating System
Libraries
Isolating the problem