0

I am getting this error:

Message: Undefined index: step3_db_error
File: C:\AppServ\www\install\index.php
Line: 368
URL: localhost/install/index.php?step=6

Here is my code:

            update_config(array(
                'timezone'          => @date_default_timezone_get(),
                'lang'              => $LANG->GetUser(),
                'OverviewNewsText'  => $LNG['sql_welcome'].'1.7',
                'uni_name'          => $LNG['fcm_universe'].' 1',
                'close_reason'      => $LNG['sql_close_reason'],
                'moduls'            => implode(';', array_fill(0, MODULE_AMOUNT, 1))
            ), 1);
            HTTP::redirectTo('index.php?step=7');
        } catch (Exception $e) {
                $template->assign(array(
                'class'     => 'fatalerror',
                'message'   => $LNG['step3_db_error'].'</p><p>'.$GLOBALS['DATABASE']->error,
            ));
            $template->show('ins_step4.tpl');
            exit;
        }

Line 368:

('message'  => $LNG['step3_db_error'].'</p><p>'.$GLOBALS['DATABASE']->error,)

and I also get:

Message: Undefined property: Database::$queryCount
File: C:\AppServ\www\includes\classes\class.Database.php
Line: 76
URL: localhost/index.php

Here is the code:

    public function query($resource)
    {
        if($result = parent::query($resource))
        {
            $this->queryCount++;
            return $result;
        }
        else
        {
            throw new Exception("SQL Error: ".$this->error."<br><br>Query Code: ".$resource);
        }
        return false;
    }

Line 76:

(this->queryCount++;)
halfer
  • 19,824
  • 17
  • 99
  • 186
  • As well, this site is for programming questions, not a place to dump random error message dumps. – Marc B Mar 09 '16 at 15:19
  • Hi Martins. It looks like you've done some good debugging here, but formatting it as one block gives the impression that you've just cut and paste a bunch of stuff. Formatting shows more clearly what work you have done. – halfer Mar 09 '16 at 16:30
  • That all said, your options are contacting the publisher of this package, and maybe logging a bug, or doing some debugging yourself. For example, is `$this->queryCount` defined in the class? I would guess this should be `protected` and have a default value of zero. – halfer Mar 09 '16 at 16:32

0 Answers0