News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

"A non well formed numeric value encountered" bug

Started by Douglas, July 31, 2015, 11:31:42 AM

Previous topic - Next topic

Douglas

SMF 2.0.10 (upgraded last night; all files are off a LARGE SMF 2.0.10 update. 3 Mod packages installed:

QuoteEmbed Tweet BBCode   1.1.1
SMF Mobile Theme Selector   1.0.2
Ohara YouTube Embed   1.2.3

Core, Default and Nibogo's Mobile themes running.

Quotehttp://www.hogville.net/yabbse/index.php?board=3.0
8: A non well formed numeric value encountered
Apply Filter: Only show the errors from this file
File: /XX/XX/XX/yabbse/Sources/Subs.php
Line: 742

741: // Format the string with our friend, number_format.
==>742: return number_format($number, is_float($number) ? ($override_decimal_count === false ? $decimal_count : $override_decimal_count) : 0, $decimal_separator, $thousands_separator);
743: }
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

margarett

It seems that $number gets a somehow incorrect format?
The problem is to understand where that comes from as it is used in lots of places...

Considering the URL ?board=3, it suggests being used in comma_format for number of views and replies (in MessageIndex.php).
Do you see any topic with a weird number of views or replies?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Douglas

Aside from several topics with tens of thousands (or sometimes hundreds of thousands) of views... nothing that sticks out weirdly.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

margarett

Does it happen with any theme or just some of these?
It suggests a wrongly passed value to comma_format, really (which is also used a lot in MessageIndex.template.php)...

I checked the patch for 2.0.10 and there are no relevant changes to MessageIndex/MessageIndex.template.php...

IMO the only chance to debug it is to add some debug code. Are all the errors related to ?board=xxx? (and is "xxx" the same board?)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Douglas

Looking at when I started getting the errors, I'm thinking it might be related to the mobile theme now.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

margarett

It should call comma_format for $board['topics'] and posts. At least judging from default theme's code...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Douglas

The more I look into this, the more I do believe that it's Nibogo's SMF Mobile theme causing the issue. I didn't have these issues until after I added his theme, I believe.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Steve

Is it really fair to blame someone publicly like that? The theme could have been referenced without using the author's name. And if that is believed to be the problem, shouldn't it be handled in that theme's support thread?

Just my opinion and I could be way out of line. :)
DO NOT pm me for support!

Douglas

Steve, with all due respect, your reply here tells me that you haven't even bothered to check into what I've been posting a bit more.

Here's a gentle hint: Go to my profile > Show Posts. Go read my replies on Nibogo's theme thread. Then go look at his community.

Need to check on the facts, first, before you automatically assume someone's being an ass. :)

You know what they say about assumptions. Use the Travis Dane line from Under Siege II, in this case. :)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Steve

After thinking about this more later (after it was too late to modify or remove my post) I regretted having said anything and my statement of 'I could be way out of line' is indeed the case. My apologies.
DO NOT pm me for support!

Advertisement: