Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

Problem with donating - wrong parameter given
#1

To start with, I have already Googled the error a few times, but didn't find anything to help me. If it was already solved - sorry!

I got a bug report from user today, he said that after donating to one of the users an error appears at the top of the page. I confirmed it - the message pops up after redirection to newpoints.php and I have no idea on what was it caused by - I didn't change any NewPoints-related settings recently.
I am using NewPoints 1.9.3 and Shop 1.5 (with Lottery 1.4 also installed), I would upgrade already, but my host is experiencing some FTP problems right now.

Screenshot:
http://screencast.com/t/TLapdPfNu

Thanks in advance!
#2

What's the amount mentioned in the PM sent to the receiver?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#3

From what I have seen, it doesn't really matter - I've sent 1 point, 10 points, 12, 17, 19, 63, 127, 512, 1024 points; the error was displayed in every situation. Not that it has any impact on the action - the points are deducted from my account and added to selected account's balance, it works as it should. The error just doesn't look good, especially given the fact, that my forum relies on NewPoints since its beginning (it's actually a PBF game), and it started appearing today, without any changes in the settings.

Do you need additional information or a test account?

Edit: The error appears even when accessing newpoints.php directly.
#4

Well I asked you that because it matters, I am not asking for the sake of it. Besides that, I also need you to check if your PHP version has been updated and if your PHP configuration has been changed since yesterday.

Sorry if I sound rude, that's not what I mean.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#5

(05-31-2012, 07:57 AM)Pirata Nervo Wrote: Sorry if I sound rude, that's not what I mean.

No, you didn't sound rude, I could have put my message in wrong words, sorry. I am just puzzled about this error, as I've never had to deal with a similar one, and so I don't know what information You may need to help me.

The PHP configuration was not upgraded, it's still 5.3.8. The settings of it do not seem to be changed. I have no idea, if it can have anything to do with it, but my hosting experienced a DDoS attack two days ago. I'll try to update to NewPoints 1.9.4 today, as the FTP is working again and updating won't hurt.
#6

I still do not know the contents of the PM...
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#7

I've copied it from the page source (my forum is in Polish):
Code:
Witaj, do Twojego konta została dodana darowizna w wysokości 1 
<img align="top" alt="AM" src="http://chipeurope.pl/msa/images/icons/newam.png">
<br>
. Powód:
<blockquote>
<cite>Cytat:</cite>
8)
</blockquote>

But the problems occurs also when accessing newpoints.php directly, i.e. on the info page.
#8

Where's supposed to be the points amount?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#9

Right before the image - where the "1" is.
#10

So that's the correct amount? 1 point? You shouldn't get that error but this will fix it:
Replace: (inc/plugins/newpoints.php)
PHP Code:
function newpoints_format_points($points)
{
    global 
$mybb;
    
    return 
$mybb->settings['newpoints_main_curprefix'].number_format($pointsintval($mybb->settings['newpoints_main_decimal'])).$mybb->settings['newpoints_main_cursuffix'];


With:
PHP Code:
function newpoints_format_points($points)
{
    global 
$mybb;
    
    return 
$mybb->settings['newpoints_main_curprefix'].number_format((float)$pointsintval($mybb->settings['newpoints_main_decimal'])).$mybb->settings['newpoints_main_cursuffix'];

To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.




Users browsing this thread: 1 Guest(s)