Browse Source

Erreur 404 Etablissement introuvable

refactoring
keun 6 years ago
parent
commit
e7e672e514
3 changed files with 1507 additions and 1 deletions
  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 View File

var $subtitle ; var $subtitle ;
public function getProducer() { 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 = '') { public function setTitle($title, $icon = '') {

+ 1
- 0
producer/controllers/ProducerController.php View File

return [ return [
'error' => [ 'error' => [
'class' => 'yii\web\ErrorAction', 'class' => 'yii\web\ErrorAction',
], ],
]; ];
} }

+ 1501
- 0
producer/runtime/logs/app.log
File diff suppressed because it is too large
View File


Loading…
Cancel
Save