I'm currently cleaning up my code with PHPCS Security Audit, for the file I'm currently working on PHPCS outputs the following errors:
10 | ERROR | No file extension has been found in a include/require function. This implies that some PHP code is not scanned by PHPCS. 10 | WARNING | Possible RFI detected with __DIR__ on require_once 10 | WARNING | Possible RFI detected with inc on require_once
I've spent the last few hours on Google and the PHP manual trying to figure this out without any solution, if anyone could help me I'd much appreciate it, thank you.
<?php define('tpl', 'template'); define('inc', 'include'); require_once(__DIR__ . '/' . inc . '/' . 'template.php'); $tpl = new Template\template(__DIR__ . '/' . tpl . '/' . 'html.tpl');