require_once'modules/logger.php';
$Logger = new Logger();
require_once 'templates/list.php';
$Templates = new templatesList();
require_once 'widgets/list.php';
$Widgets = new widgetsList();
I use $Logger in templates/list.php and in widgets/list.php.
$Templates I use in /widgets/list.php.
Yukarıdaki kod bu hatayı atar:
Notice: Undefined variable:
Loggerin.../templates/list.phpon line 99 Fatal error: Call to a member functiontoLog()on a non-object in.../templates/list.phpon line 99
UPD Here is line 99:
$Logger->toLog( $contentData );