adam2314 / linet3

Linet accounting application
16 stars 18 forks source link

Fixing web error. #670

Open avielw opened 7 years ago

avielw commented 7 years ago

PHP Warning – yii\base\ErrorException Creating default object from empty value

1. in /var/www/html/protected/helpers/Linet3Helper.php at line 95
8687888990919293949596979899100101102103104

            else
                return true;

        return $setting->value;
    }

    public static function setTheme() {
        $theme = \Yii::$app->user->getParam('theme');
        if ($theme !== '') {
            Yii::$app->view->theme->pathMap = [
                '@app/views' => '@webroot/themes/' . $theme,
                '@app/widgets' => '@webroot/themes/' . $theme . '/widgets',
                '@app/modules' => '@webroot/themes/' . $theme . '/modules',
            ];
        }
    }

    public static function setSetting($id, $value) {
        if (\Yii::$app->db->schema->getTableSchema('{{%config}}') === null) {

... ...