I was running a PHP test development server on localhost and I stumbled across this warning that breaks the site entirely, the error is
PHP Warning: Message: strpos(): Empty needle
and the snippet causing this error is
if ($CI->config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->base_url()) === FALSE OR strpos($form, 'method="get"')))
I tried googling for the error but none gave me a solid answer about it.
2
Answers
Solution found, URL helper wasn't loading, had to load it manually in any form using
$this->load->helper('url');
, still don't know why autoload doesn't work but I guess i'll find a solution to it, thanks to all fellas especially @ADyson and @nice_dev.you can run a debugger like xdebug and put break points in the code and stop there and inspect the values or you can log them to the CI files