Getting a repeated bad error

Started by wynnyelle, August 30, 2012, 05:56:13 AM

Previous topic - Next topic

wynnyelle

Here is the error:

Quote
http://warriorcatsrpg.com/index.php?amp;action=post2;board=156Wrong value type sent to the database. Integer expected. (id_msg)
Function: PostFile: /home/warrior/public_html/Sources/Post.php
Line: 784

I'm getting loads of these. Does anyone know what this means?

kat

Do you happen to use the "Related Topics" mod?

Can you attach said file "Post.php", please, GS?

wynnyelle

No, I don't use that. But here is post.php.

MrPhil

$_REQUEST['msg'] is either unset or is a string (non-integer) at line 782:
'id_msg' => $_REQUEST['msg'],

I'd rather figure out why this 'msg' is not set or is not an integer, but in the meantime you can try handling it like it's done all throughout this file:
'id_msg' => (int) $_REQUEST['msg'],

This will at least force the value to be numeric (a 0, worst case) and get you past this particular error. I don't like this solution because it doesn't address why it has a bad value in the first place, but at least the "fix" is compatible with the rest of the code.


Advertisement: