[cBB Blog 1.0.0-beta]Error SQL al borrar una entrada


Due to a lack of free time, both support on this forum and extension development are currently limited.
All bugs are noted and saved for fixes, even if there are no replies to the posts.
Normal activity will resume as soon as possible.
User avatar
IvanPF
Administrator
 
Posts: 2265
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Thu Mar 14, 2013 12:38 pm • via Web
Mod: cBB Blog 1.0.0-beta
Error: Al borrar una entrada, aparece un error SQL (Not values in SQL Comparision)

Solución:
1. Abrir blog/includes/functions.php
2. Buscar:
Code: Select all
      $sql = 'SELECT physical_filename
         FROM ' . BLOG_ATTACHMENTS_TABLE . '
         WHERE ' . $db->sql_in_set('physical_filename', array_keys($attach_ary));
      $result = $db->sql_query($sql);
      while($row = $db->sql_fetchrow($result))
      {
         unset($attach_ary[$row['physical_filename']]);
      }
      $db->sql_freeresult($result);

3. Reemplazar por:
Code: Select all
      if(sizeof($attach_ary))
      {
         $sql = 'SELECT physical_filename
            FROM ' . BLOG_ATTACHMENTS_TABLE . '
            WHERE ' . $db->sql_in_set('physical_filename', array_keys($attach_ary));
         $result = $db->sql_query($sql);
         while($row = $db->sql_fetchrow($result))
         {
            unset($attach_ary[$row['physical_filename']]);
         }
         $db->sql_freeresult($result);
      }

Who is online

Users browsing this forum: No registered users and 0 guests