Advertisement:

Author Topic: Re: Error Log is filed with numeric value errors  (Read 264 times)

Offline LiBen

  • Semi-Newbie
  • *
  • Posts: 41
Re: Error Log is filed with numeric value errors
« on: February 07, 2021, 11:05:15 PM »
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.

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)
Code: [Select]
<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)

Code: [Select]
<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.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Re: Error Log is filed with numeric value errors
« Reply #1 on: February 20, 2021, 01:56:41 PM »
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.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,225
  • Gender: Male
    • Kindred-999 on GitHub
Re: Error Log is filed with numeric value errors
« Reply #2 on: February 20, 2021, 03:58:53 PM »
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
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."

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Re: Error Log is filed with numeric value errors
« Reply #3 on: February 20, 2021, 04:07:37 PM »
Thanks Kindred. Since the issue includes a solution, and this doesn't seem to fall in to bug category - Marking solved then.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"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