حل مشكلة هاك الشكر Unknown column '0Array' in 'where clause'

WebCraker

العبد الفقير إلى الله
طاقم الإدارة
9 مارس 2008
5,645
50
48
Egypt
support-ar.com
السلام عليكم

أعزائي زوار وأعضاء الدعم العربي الكرام قد تكون أتيت لهذا الموضوع بسبب أنه واجتهك مشكلة فى هاك الشكر أو مشكلة هاك الأوسمة بعد الترقية إلى النسخة 3.8.11 أو 3.8.12

الخطأ:
كود:
Database error in vBulletin 3.8.12:

Invalid SQL:

SELECT * FROM post_thanks AS post_thanks INNER JOIN user AS user USING (userid) WHERE post_thanks.postid IN (0Array) ORDER BY post_thanks.username ASC;

MySQL Error   : Unknown column '0Array' in 'where clause'
Error Number  : 1054
Request Date  : Monday, Sep 28th 2020 @ 05:45:13 PM
Error Date    : Monday, Sep 28th 2018 @ 05:45:13 PM
Script        : http://www.example.com/vb/showthread.php?t=2333
Referrer      : http://www.example.com/vb/showthread.php?t=2333
IP Address    :
Username      :
Classname     : vB_Database_MySQLi
Server        :
User Agent    :

أو المشكلة التالية

كود:
Error:
Invalid SQL:
SELECT * FROM vb_post_thanks AS post_thanks INNER JOIN vb_user AS user USING (userid) WHERE post_thanks.postid IN (0Array) ORDER BY post_thanks.username ASC;

MySQL Error   : Unknown column '0Array' in 'where clause'
Error Number  : 1054

الحل :

نقوم بالتعديل على الملف التالي
includes/functions_post_thanks.php

نبحث عن
PHP:
       if ($postids)
       {
           $post_ids = "0$postids";
       }
       else
       {
           $post_ids = $postid;
       }
استبدل بالكود التالي
PHP:
      if (empty($postids))
       {
           $postids[] = $postid;
       }
بنفس الملف إبحث عن السطر التالي
PHP:
           $thanks = $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX. "post_thanks AS post_thanks INNER JOIN " .TABLE_PREFIX. "user AS user USING (userid) WHERE post_thanks.postid IN (" . $post_ids . ") ORDER BY post_thanks.username ASC");
استبدله بالسطر التالي
PHP:
           $thanks = $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX. "post_thanks AS post_thanks INNER JOIN " .TABLE_PREFIX. "user AS user USING (userid) WHERE post_thanks.postid IN (" . implode(',', $postids) . ") ORDER BY post_thanks.username ASC");
بنفس الملف ابحث عن السطر التالي
PHP:
           $thanks = $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN (" . $post_ids . ") ORDER BY username ASC");
استبدله بالسطر التالي
PHP:
           $thanks = $vbulletin->db->query_read("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN (" . implode(',', $postids) . ") ORDER BY username ASC");

احفظ الملف وبالتوفيق
 
التعديل الأخير: