Замок заднего сидения уаз

TypeError

Argument 1 passed to frontend\controllers\CatalogController::findCategory() must be of the type integer, null given, called in /home/web/uaz/frontend/controllers/CatalogController.php on line 126

> /** * @param int $id * * @return CatalogCategory * * @throws NotFoundHttpException */ protected function findCategory(int $id) < $model = CatalogCategory::findOne($id); if (!$model) < throw new NotFoundHttpException('Категория не найдена.'); >return $model; > /**

2. in /home/web/uaz/frontend/controllers/CatalogController.php at line 126 – frontend\controllers\CatalogController::findCategory( null )

* * @return string */ public function actionProduct(int $id = null, int $categoryId = null) < $product = $this->findProduct($id); $category = $this->findCategory($categoryId); return $this->render('product', [ 'product' => $product, 'category' => $category, ]); >

4. in /home/web/uaz/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array([ frontend\controllers\CatalogController , ‘actionProduct’ ], [ ‘2858’ , null ])

$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 /home/web/uaz/vendor/yiisoft/yii2/base/Controller.php at line 157 – yii\base\InlineAction::runWithParams([ ‘id’ => ‘2858’ , ‘amp;categoryId’ => ‘112’ ])

> $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 /home/web/uaz/vendor/yiisoft/yii2/base/Module.php at line 528 – yii\base\Controller::runAction( 'product' , [ 'id' => '2858' , 'amp;categoryId' => '112' ])

$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 /home/web/uaz/vendor/yiisoft/yii2/web/Application.php at line 103 – yii\base\Module::runAction( 'catalog/product' , [ 'id' => '2858' , 'amp;categoryId' => '112' ])

$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 /home/web/uaz/vendor/yiisoft/yii2/base/Application.php at line 386 – yii\web\Application::handleRequest( yii\web\Request )

< 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();
require(__DIR__ . '/../../common/config/main.php'), require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); (new yii\web\Application($config))->run();
$_GET = [ 'id' => '2858', 'amp;categoryId' => '112', ];

Источник

Читайте также:  Схема jeep compass 2007
Оцените статью
Adblock
detector