浏览代码

Erreur 404 Etablissement introuvable

refactoring
keun 6 年前
父节点
当前提交
e7e672e514
共有 3 个文件被更改,包括 1507 次插入1 次删除
  1. +5
    -1
      producer/components/ProducerView.php
  2. +1
    -0
      producer/controllers/ProducerController.php
  3. +1501
    -0
      producer/runtime/logs/app.log

+ 5
- 1
producer/components/ProducerView.php 查看文件

@@ -9,7 +9,11 @@ class ProducerView extends \yii\web\View {
var $subtitle ;
public function getProducer() {
return Etablissement::findOne(['slug' => Yii::$app->getRequest()->getQueryParam('slug_producer')]) ;
$etablissement = Etablissement::findOne(['slug' => Yii::$app->getRequest()->getQueryParam('slug_producer')]) ;
if($etablissement)
return $etablissement;
else
throw new \yii\web\HttpException(404, 'Etablissement introuvable');
}
public function setTitle($title, $icon = '') {

+ 1
- 0
producer/controllers/ProducerController.php 查看文件

@@ -15,6 +15,7 @@ class ProducerController extends CommonController {
return [
'error' => [
'class' => 'yii\web\ErrorAction',
],
];
}

+ 1501
- 0
producer/runtime/logs/app.log
文件差异内容过多而无法显示
查看文件


正在加载...
取消
保存