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?

    [CODE]
    — 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
      

    [/CODE]

    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.


 

570
Online

5.4k
Users

12.6k
Topics

118.6k
Posts