FOG 1.1.1 MySQL.class.php - php throws an error



  • Hello,

    I’m working through installing FOG on an openSuSe machine (so please bear with me in the future). During my work, PHP threw up an error related to MySQL.class.php. - array expected.

    Is this patch correct?

    
    --- MySQL.class.php.orig        2014-06-26 17:55:09.884848594 +0200
    +++ MySQL.class.php.new 2014-06-26 17:55:29.137230586 +0200
    @@ -147,7 +147,7 @@
                            if ($this->queryResult === false)^M
                                    return false;^M
                            // Return: 'field' if requested and field exists in results, otherwise the raw result^M
    -                      return ($field && array_key_exists($field, $this->result) ? $this->result[$field] : $this->result);^M
    +                      return ($field && array_key_exists($field, $this->queryResult) ? $this->queryResult[$field] : $this->queryResult);^M
                    }^M
                    catch (Exception $e)^M
                    {^M
     
    
    

    regards,
    Alasdair



  • ok, thank you. I’ll search further


  • Senior Developer

    No,

    The problem was probably related to your Config.class.php file not having the right settings for db values.


Log in to reply
 

373
Online

38724
Users

10553
Topics

99875
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.