Skip to content

Commit

Permalink
Fixed issue: error when installing LimeSurvey
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Jun 22, 2018
1 parent 0ba08bd commit 6e2bc4e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions application/core/LSHttpRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,14 @@ protected function normalizeRequest()
$beforeUrlCheck = new PluginEvent('beforeUrlCheck');
$beforeUrlCheck->set('routes', $this->noCsrfValidationRoutes);
$beforeUrlCheck->set('params', []);
App()->getPluginManager()->dispatchEvent($beforeUrlCheck);
$validationRoutes = $beforeUrlCheck->get('routes');
$validationParams = $beforeUrlCheck->get('params');
try{
App()->getPluginManager()->dispatchEvent($beforeUrlCheck);
$validationRoutes = $beforeUrlCheck->get('routes');
$validationParams = $beforeUrlCheck->get('params');
} catch(CDbException $e) {
$validationRoutes = [];
$validationParams = [];
}

foreach ($validationRoutes as $cr) {
if (preg_match('#'.$cr.'#', $route)) {
Expand Down

0 comments on commit 6e2bc4e

Please sign in to comment.