debug: show client ip of bad requests

This commit is contained in:
Tanguy Pruvot 2017-08-04 06:06:24 +02:00
parent 460574c555
commit 777f39314c

View file

@ -304,10 +304,12 @@ class CWebApplication extends CApplication
$controller->run($actionID);
$this->_controller=$oldController;
}
else
throw new CHttpException(404,Yii::t('yii','CWebApp: Unable to resolve the request "{route}".',
else {
$client_ip = arraySafeVal($_SERVER,'REMOTE_ADDR');
throw new CHttpException(404, $client_ip.': '.Yii::t('yii','CWebApp: Unable to resolve the request "{route}".',
array('{route}'=>$route===''?$this->defaultController:$route)));
}
}
/**
* Creates a controller instance based on a route.