I am getting this error code on my impresspages.
Fatal error: Call to a member function log() on a non-object in /home/public_html/site/index.php on line 52
I havnt changed anything on the website for 6 months. Suddenly a few days ago it started and has contued since.
This is my index.php:
<?php
/**
*
* ImpressPages CMS main frontend file
*
* This file initiates required variables and outputs the content.
*
* @package ImpressPages
*
*
*/
/** Make sure files are accessed through index. */
if (!defined('CMS')) {
define('CMS', true); // make sure other files are accessed through this file.
}
if (!defined('FRONTEND')) {
define('FRONTEND', true); // make sure other files are accessed through this file.
}
if((PHP_MAJOR_VERSION < 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3)) {
echo 'Your PHP version is: '.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'. To run ImpressPages CMS you need PHP 5.3.*';
exit;
}
if(is_file(__DIR__.'/ip_config.php')) {
require (__DIR__.'/ip_config.php');
} else {
require (__DIR__.'/../ip_config.php');
}
if (DEVELOPMENT_ENVIRONMENT){
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', '1');
} else {
ini_set('display_errors', '0');
}
try {
require_once(BASE_DIR.FRONTEND_DIR.'init.php');
require_once(BASE_DIR.FRONTEND_DIR.'bootstrap.php');
} catch (\Exception $e) {
$log->log('System', 'Exception caught', $e->getMessage().' in '.$e->getFile().':'.$e->getLine());
throw $e;
}
These are line 52/53:
$log->log('System', 'Exception caught', $e->getMessage().' in '.$e->getFile().':'.$e->getLine());
throw $e;
Can somebody please explain why this is occuring and what i can do?