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
Fatal error: ceil(): Argument #1 ($num) must be of type int|float, string given in BaseDraw.php #19940
Comments
This is yet another issue with numbers that a formatted to early. The ImageGraph fetches the numbers formatted from the database. Using those for calculations might result in failures. matomo/plugins/ImageGraph/API.php Lines 557 to 573 in a36b45a
But this part actually might result in a invalid number. The error above seems to come from a revenue like I tried simply using the unformatted metrics for ImageGraph (see https://github.com/matomo-org/matomo/compare/m19940?expand=1), which fixes the problem above. But that means that most percent values, like conversion rate, are then not formatted at all and are used as their rate value, e.g. This is actually a more general problem. Not sure if we already have a extra issue about that or only discussed that on various other ones. But the percentage metrics should actually not do any calculations while formatting. We might need to implement a way, that those metrics are always "calculated" automatically and formatted only when needed. |
Do we now have an issue tracking the more general case @sgiehl, or could you please create one? |
FYI this happened again a few times in GridGraph.php . Not BaseDraw.php |
This has happened again in |
This happened again: |
This happened again |
I've seen multiple reports of this in cloud alerts/logs. Payload example:
|
This happened again |
2 similar comments
This happened again |
This happened again |
This is still happening regularly |
This is still happening |
See details below:
URL: /index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=Goals&apiAction=get&token_auth=XYZANONYMIZED&idGoal=ecommerceOrder&period=day&date=2022-10-03,2022-11-01&filter_sort_column=revenue&column=revenue&columns=revenue&language=en&width=984&height=450&fontSize=27&showMetricTitle=0&aliasedGraph=1&legendAppendMetric=0&backgroundColor=efefef&gridColor=dcdcdc&colors=3450A3%2C43a047&legendFontSize=27&cacherand=7280344
The text was updated successfully, but these errors were encountered: