Current time: 05-24-2012, 06:23 AM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] PGSQL: Error during upgrade
08-22-2008, 11:56 AM (This post was last modified: 08-22-2008 12:25 PM by Michael S..)
Post: #1
[F] PGSQL: Error during upgrade
During the upgrade of a board using pgsql you get the following error:
Quote:Fatal error: [SQL] [0] ERROR: invalid input syntax for integer: "yes"
SELECT name,sid FROM mybb_settings WHERE isdefault='1' OR isdefault='yes' in /var/www/testforum.blubotter.org/htdocs/moepforum/inc/db_pgsql.php on line 552
The query can be found in the file upgrade.php in the lines 717 and 723.

Possible fix: Replace
PHP Code:
        $query $db->simple_select("settings""name,sid""isdefault='1' OR isdefault='yes'");
        while(
$setting $db->fetch_array($query))
        {
            
$settings[$setting['sid']] = $setting['name'];
        }

        
$query $db->simple_select("settinggroups""name,title,gid""isdefault='1' OR isdefault='yes'"); 
with:
PHP Code:
if($db->type == "mysql" || $db->type == "mysqli")
        {
            
$wheresettings "isdefault='1' OR isdefault='yes'";
        }
        else
        {
            
$wheresettings "isdefault='1'";
        }
        
$query $db->simple_select("settings""name,sid"$wheresettings);
        while(
$setting $db->fetch_array($query))
        {
            
$settings[$setting['sid']] = $setting['name'];
        }

        
$query $db->simple_select("settinggroups""name,title,gid"$wheresettings); 

Greets,
Michael
-------------
[Image: donation_drive_sig.png]
Visit this user's website Find all posts by this user
08-26-2008, 04:07 AM
Post: #2
[F] PGSQL: Error during upgrade
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
Visit this user's website Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication