Advertisement:

Author Topic: Wrong value type sent to the database. Integer expected.  (Read 2105 times)

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Wrong value type sent to the database. Integer expected.
« on: December 11, 2008, 04:05:46 AM »
I having sometimes this strange error when users try to save record of some game.

Code: [Select]
http://ediboard.altervista.org/index.php?autocom=arcade&do=savescore
Wrong value type sent to the database. Integer expected.
File: /membri/ediboard/Sources/Subs-Db-mysql.php
Riga: 147

line 147 of Sibs_DB-mysql.php is:
Quote
146:     if (!is_numeric($replacement) || (string) $replacement !== (string) (int) $replacement)
==>147:    smf_db_error_backtrace('Wrong value type sent to the database. Integer expected.', '', E_USER_ERROR, __FILE__, __LINE__);
148:    return (string) (int) $replacement;

i searched in forum but not found solution or reply

thx in advance
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline H

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,662
  • Gender: Male
Re: Wrong value type sent to the database. Integer expected.
« Reply #1 on: January 02, 2009, 07:53:16 AM »
Hi edi67, do you still require assistance with this?

As this is related to the arcade, you may get better support on the arcade support site.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • Criminal Brief UK
Re: Wrong value type sent to the database. Integer expected.
« Reply #2 on: January 02, 2009, 01:59:49 PM »
Its a bug with either smf arcade, OR the game that you were using.

SMF is merely giving an error message because you attempt to send a non-integer when an integer was expected.

Eg the score was 'abcde' instead of 23124.
So like I said, it could either be a bug in smf arcade (not checking for non-integer before attempting to save it).
or
a bad game which is sending out non-integer based scores.

I would suggest raising this in the smf arcades support topic or on the smfarcade.info forum