Just went from:
SMF 2.0.17 to 2.0.18
PHP 7.3 to 7.4.15
At the same time I took a look at the following problem:
When members went to action=profile;area=statistics
Following error would occur:
8: A non well formed numeric value encountered
File: .../Themes/default/Profile.template.php
Line: 1105
The solution of Demidrin worked.
Quote from: Demidrin on June 21, 2017, 01:27:18 PM
Alright, it seems at least at my template there is a bug for default number format using commas in decimal numbers?
The current situation (line numbers may differ):
Profile.template.php (line 1099)
<div class="profile_pie" style="background-position: -', ((int) ($activity['percent'] / 5) * 20), 'px 0;" title="', sprintf($txt['statPanel_topBoards_posts'], $activity['posts'], $activity['total_posts'], $activity['posts_percent']), '">
I fixed this template part like this (using now the correct value for the calculation part):
Profile.template.php (line 1099)
<div class="profile_pie" style="background-position: -', ((int) ($activity['posts_percent'] / 5) * 20), 'px 0;" title="', sprintf($txt['statPanel_topBoards_posts'], $activity['posts'], $activity['total_posts'], $activity['posts_percent']), '">
Maybe somebody can check if this is a general problem in the default template?
BR
I check the default install for SMF 2.0.18 and it has the same error.
Just to make sure, you were able to replicate this on a clean 2.0.18 install? That would sound like a bug to me. Could you confirm this is the case, and we could move this to the bug reports board.
I can nto replicate this... and the reference to a PIE chart implies a mod to me, since all of the charts on the default page are bar graphs...
just checked.... profile_pie is not a class in the default product
Thanks Kindred. Since the issue includes a solution, and this doesn't seem to fall in to bug category - Marking solved then.