2014-10-01 90 views
0

我在我的impress页面上收到此错误代码。致命错误:调用非对象上的成员函数(impresspages)

Fatal error: Call to a member function log() on a non-object in /home/public_html/site/index.php on line 52 

我havnt在网站上更改了6个月。突然在几天前它开始了并且从那以后继续。

这是我的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; 
} 

这些线52/53:

$log->log('System', 'Exception caught', $e->getMessage().' in '.$e->getFile().':'.$e->getLine()); 
throw $e; 

有人可以请解释为什么这是发生什么我可以做什么?

+0

那么'$ log'是什么?它在哪里定义? 'var_dump()'+'error_reporting(E_ALL)' – zerkms 2014-10-01 21:43:16

+0

不知道。我的编程技巧和理解极其有限。我在寻找什么? – user3760157 2014-10-02 11:32:44

+0

值得问您的主机提供商是否没有改变任何东西。将ImpressPages更新到最新的3.x分支也很好(http://sourceforge.net/projects/impresspages/files/?source=navbar)。 – 2014-10-02 16:29:25

回答

0

我删除了error_handler.php中的一些行(关于第64行,如果有人感兴趣)并且消息突然消失了。一切都很好......现在:D

相关问题