Hi, i think there is a bug!

When I send a pm to a user, and then I go to read pms it shows it.
OK so far.
BUT, if the user, deletes the pm from his inbox, and then, i delete it also from my sent folder, it still shows it in read pms.
If i click on the link to see it i get a database error saying:
Code:
Database error in vBulletin 3.6.1:
Invalid SQL:
SELECT username FROM user WHERE userid =;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Error Number : 1064
i suppose this is happening because the hack does not find that pm in the database.
any solutions?
thanks