Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 2 | Features | 1 |
1 | <?php |
||
24 | public function index() |
||
25 | { |
||
26 | parent::init(); |
||
27 | if (!Director::is_cli()) { |
||
28 | $this->httpError(404); |
||
29 | } |
||
30 | |||
31 | $this->application = new SilverstripeApplication(); |
||
32 | |||
33 | // remove the framework/cli-script.php argument |
||
34 | array_shift($_SERVER['argv']); |
||
35 | |||
36 | $this->application->run(new ArgvInput($_SERVER['argv'])); |
||
37 | } |
||
38 | |||
76 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.