Вы здесь
Главная > Танец > «Open look» XX: От русской классики до земли обетованной
yii\base\ErrorException
Copied! Copy Stacktrace Search Stackoverflow Search Google Error

PHP Noticeyii\base\ErrorException

Undefined variable: _SESSION

  • 1. in /var/www/okolo/data/www/okolo.me/shop/controllers/ShopController.php at line 66
    57585960616263646566676869707172
                             *
         * @return Response|string
         */
     
     
    public function actionAct(){
        if (!Yii::$app->user->isGuest) {
      echo serialize($_SESSION);
     }else{
        echo serialize($_SESSION);
     }
    }
     
     
     
    }
                    
  • 2. in /var/www/okolo/data/www/okolo.me/shop/controllers/ShopController.php at line 66 yii\base\ErrorHandler::handleError(8, 'Undefined variable: _SESSION', '/var/www/okolo/data/www/okolo.me...', 66, ...)
    60616263646566676869707172
                         
     
    public function actionAct(){
        if (!Yii::$app->user->isGuest) {
      echo serialize($_SESSION);
     }else{
        echo serialize($_SESSION);
     }
    }
     
     
     
    }
                    
  • 3. app\controllers\ShopController::actionAct()
  • 4. in /var/www/okolo/data/www/okolo.me/shop/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array([app\controllers\ShopController, 'actionAct'], [])
    515253545556575859
                                $args = $this->controller->bindActionParams($this, $params);
            Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
            if (Yii::$app->requestedParams === null) {
                Yii::$app->requestedParams = $args;
            }
     
            return call_user_func_array([$this->controller, $this->actionMethod], $args);
        }
    }
                    
  • 5. in /var/www/okolo/data/www/okolo.me/shop/vendor/yiisoft/yii2/base/Controller.php at line 157 yii\base\InlineAction::runWithParams(['r' => 'shop/act'])
    151152153154155156157158159160161162163
                                }
     
            $result = null;
     
            if ($runAction && $this->beforeAction($action)) {
                // run the action
                $result = $action->runWithParams($params);
     
                $result = $this->afterAction($action, $result);
     
                // call afterAction on modules
                foreach ($modules as $module) {
                    /* @var $module Module */
                    
  • 6. in /var/www/okolo/data/www/okolo.me/shop/vendor/yiisoft/yii2/base/Module.php at line 528 yii\base\Controller::runAction('act', ['r' => 'shop/act'])
    522523524525526527528529530531532533534
                                $parts = $this->createController($route);
            if (is_array($parts)) {
                /* @var $controller Controller */
                list($controller, $actionID) = $parts;
                $oldController = Yii::$app->controller;
                Yii::$app->controller = $controller;
                $result = $controller->runAction($actionID, $params);
                if ($oldController !== null) {
                    Yii::$app->controller = $oldController;
                }
     
                return $result;
            }
                    
  • 7. in /var/www/okolo/data/www/okolo.me/shop/vendor/yiisoft/yii2/web/Application.php at line 103 yii\base\Module::runAction('shop/act', ['r' => 'shop/act'])
    979899100101102103104105106107108109
                                    $params = $this->catchAll;
                unset($params[0]);
            }
            try {
                Yii::debug("Route requested: '$route'", __METHOD__);
                $this->requestedRoute = $route;
                $result = $this->runAction($route, $params);
                if ($result instanceof Response) {
                    return $result;
                }
     
                $response = $this->getResponse();
                if ($result !== null) {
                    
  • 8. in /var/www/okolo/data/www/okolo.me/shop/vendor/yiisoft/yii2/base/Application.php at line 386 yii\web\Application::handleRequest(yii\web\Request)
    380381382383384385386387388389390391392
                            {
            try {
                $this->state = self::STATE_BEFORE_REQUEST;
                $this->trigger(self::EVENT_BEFORE_REQUEST);
     
                $this->state = self::STATE_HANDLING_REQUEST;
                $response = $this->handleRequest($this->getRequest());
     
                $this->state = self::STATE_AFTER_REQUEST;
                $this->trigger(self::EVENT_AFTER_REQUEST);
     
                $this->state = self::STATE_SENDING_RESPONSE;
                $response->send();
                    
  • 9. in /var/www/okolo/data/www/okolo.me/shop/web/index.php at line 13 yii\base\Application::run()
    78910111213
                        require __DIR__ . '/../vendor/autoload.php';
    require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
     
     
    $config = require __DIR__ . '/../config/web.php';
     
    (new yii\web\Application($config))->run();
                    
$_GET = [
    'r' => 'shop/act',
];

Добавить комментарий