Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function process(array &$state): void |
||
28 | { |
||
29 | if (isset($state['isPassive']) && $state['isPassive'] === true) { |
||
30 | // We have a passive request. Skip the warning |
||
31 | return; |
||
32 | } |
||
33 | |||
34 | // Save state and redirect. |
||
35 | $id = Auth\State::saveState($state, 'warning:request'); |
||
36 | $url = Module::getModuleURL('preprodwarning/warning'); |
||
37 | $httpUtils = new Utils\HTTP(); |
||
38 | $httpUtils->redirectTrustedURL($url, ['StateId' => $id]); |
||
39 | } |
||
41 |