CodeIgniter Forums
Error Logging - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Error Logging (/showthread.php?tid=62286)



Error Logging - agriz - 06-27-2015

How do i get the page name along with the script name?

I got the following error.
Undefined variable: title views/head.php 7

But the title has been set in the controller.
So, I have no idea which file is causing the trouble.

Can you please tell me how to find which file is creating this problem?


RE: Error Logging - ivantcholakov - 06-28-2015

As a workaround, at the beginning of the file views/head.php add the following:

Code:
if (!isset($title))
{
    $title = NULL;
}

It would be convenient if only the written log (on non-CLI) contained the URLs of erroneous pages, but such a feature is not implemented. Such a feature could be added here: https://github.com/bcit-ci/CodeIgniter/blob/3.0.0/system/core/Log.php#L207