FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Quirk while upgrading from 2.6.0 to 2.6.14
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Quirk while upgrading from 2.6.0 to 2.6.14 [message #26256 is a reply to message #26254] Tue, 12 July 2005 10:00 Go to previous messageGo to previous message
fritti is currently offline  fritti   Netherlands
Messages: 7
Registered: July 2005
Karma:
Junior Member
Ok, I figured it out. The code in db_all is not valid.

function db_all($q)
{
        if (function_exists('pg_fetch_all_columns')) {
                return pg_fetch_all_columns(q($q));
        }

        if (!($r = pg_fetch_all(q($q)))) {
                return array();
        }
        $f = array();
        foreach ($r as $v) {
                $f[] = $v[0];
        }
        return $f;
}


The problem is that pg_fetch_all returns a hash indexed on field name instead of a regular array. So the assignment

$f[] = $v[0]


fail in the case of the consistency query. In that case it should be

$f[] = $v['id']


After changing this my consistency check runs to completion.

I guess this means that all uses of db_all are broken right now. Was this changed in this release? (related, is there an online CVS browser somewhere?)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: phpBB2 converter does not work
Next Topic: fudapi.inc.php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Dec 12 14:41:04 GMT 2024

Total time taken to generate the page: 0.04085 seconds