These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | namespace Redaxscript\Bootstrap; |
||
3 | |||
4 | use Redaxscript\Filter; |
||
5 | use function getenv; |
||
6 | |||
7 | /** |
||
8 | * children class to boot the cache |
||
9 | * |
||
10 | * @since 3.1.0 |
||
11 | * |
||
12 | * @package Redaxscript |
||
13 | * @category Bootstrap |
||
14 | * @author Henry Ruhs |
||
15 | */ |
||
16 | |||
17 | class Cache extends BootstrapAbstract |
||
18 | { |
||
19 | /** |
||
20 | * automate run |
||
21 | * |
||
22 | * @since 3.1.0 |
||
23 | */ |
||
24 | |||
25 | 3 | public function autorun() : void |
|
26 | { |
||
27 | 3 | $filterBoolean = new Filter\Boolean(); |
|
28 | 3 | $noCache = $filterBoolean->sanitize($this->_request->getQuery('no-cache')) || getenv('NO_CACHE'); |
|
0 ignored issues
–
show
|
|||
29 | |||
30 | /* set the registry */ |
||
31 | |||
32 | 3 | $this->_registry->set('noAssetCache', false); |
|
33 | 3 | $this->_registry->set('noPageCache', false); |
|
34 | 3 | if ($this->_registry->get('loggedIn') === $this->_registry->get('token') || $noCache) |
|
35 | { |
||
36 | 2 | $this->_registry->set('noAssetCache', true); |
|
37 | 2 | $this->_registry->set('noPageCache', true); |
|
38 | } |
||
39 | 3 | } |
|
40 | } |
||
41 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.