News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Re: Error Log is filed with numeric value errors

Started by LiBen, February 07, 2021, 11:05:15 PM

Previous topic - Next topic

LiBen

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.

Aleksi "Lex" Kilpinen

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.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Aleksi "Lex" Kilpinen

Thanks Kindred. Since the issue includes a solution, and this doesn't seem to fall in to bug category - Marking solved then.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: