Forum Bug(s)

I’ve been going through JGO, and I’ve noticed on several different posts. SHC specifically keeps the page from loading. Here’s the error I get ( see bottom note also! )

Notice something weird here?

Here’s the error:

2: log() expects parameter 1 to be double, string given
File: /home/jgo/public_html/addon_appreciation.php
Line: 191

Also, a post specifically with SHC posting on: http://www.java-gaming.org/topics/lwjgl-white-box-instead-of-texture/35458/msg/335757/view.html#msg335757 I think the two errors in the images are related. Not going to pretend to know PHP, but I think it’s the string-> double thingy. Funny this is only for SHC, nobody else has these errors. (sorry for singling you out SHC…

I’m sure you guys have seen it by now. But I also wanted to start this topic for anyone else who want’s to post a bug they’ve found. Rather than start a whole new topic.

I’m not, I did some searching and I found it to be a coding joke embedded into SMF. If you remember your childhood, you may have written 1337 as leet, and that is itself the problem.

I’ve searched for this error in the internet, and found that it was some line in [icode]Sources/Load.php[/icode] which is something like this (unsure, never seen myself, but a forum post on SimpleMachines community says this).


'posts' => $profile['posts'] == 1337 ? 'leet' : comma_format($profile['posts'])

I think this is causing the error with your addon ‘Appreciation’ Riven, you are reading the display text instead of the post count that is stored internally.

So, I took this risk of posting this information, so hopefully that this will increase my post count, and also get this error solved.

Huh, that actually made me smile a bit.
Damn easter eggs.

  • Jev

Meh, stupid SMF. I don’t actually have access to the ‘internal data’ in SMFs ‘template engine’.

[icode]Sources/Load.php[/icode]


array(
   ...
-   'posts' => $profile['posts'] > 100000 ? $txt[683] : ($profile['posts'] == 1337 ? 'leet' : comma_format($profile['posts'])),
+   'posts' => $profile['posts'],
   ...
);

[icode]Themes/default/Display.template.php[/icode]


-   $postCount  = $message['member']['posts'];
+   $postCount  = intval($message['member']['posts']);

If there are other easter-eggs, the intval(…) will drop your $postcount to zero, which will reduce your rank somewhat - you might lose a star or two, until you once again have a post count that is expressed as a number. ::slight_smile:

Oh but it was fun! Killjoy ::slight_smile: