From ce5c7061a8e4435254edaba70ce2b3bc0396e5e0 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Fri, 16 Apr 2010 08:59:57 +0000 Subject: [PATCH] * fix the issue of E_STRICT. --- www/index.php | 6 +++--- www/install.php | 5 +++-- www/upgrade.php | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/www/index.php b/www/index.php index 6f23e01f52..72b9cd7a44 100644 --- a/www/index.php +++ b/www/index.php @@ -23,6 +23,8 @@ * @version $Id$ * @link http://www.zentao.cn */ +error_reporting(0); + /* 记录最开始的时间。*/ $timeStart = _getTime(); @@ -35,6 +37,7 @@ include '../framework/helper.class.php'; /* 实例化路由对象,加载配置,设置时区。*/ $app = router::createApp('pms', dirname(dirname(__FILE__))); $config = $app->loadConfig('common'); +$app->setDebug(); $app->setTimezone(); /* 检查是否已经安装。*/ @@ -43,9 +46,6 @@ if(!isset($config->installed) or !$config->installed) die(header('location: inst /* 连接到数据库。*/ $dbh = $app->connectDB(); -/* 根据debug选项设置错误信息。*/ -$config->debug ? error_reporting(E_ALL) : error_reporting(0); - /* 如果是debug模式,记录sql查询。*/ if($config->debug) register_shutdown_function('_saveSQL'); diff --git a/www/install.php b/www/install.php index 1b78d8e627..93df2fcdd9 100644 --- a/www/install.php +++ b/www/install.php @@ -21,7 +21,7 @@ * @version $Id$ * @link http://www.zentao.cn */ -error_reporting(E_ALL); +error_reporting(0); session_start(); define('IN_INSTALL', true); @@ -31,9 +31,10 @@ include '../framework/control.class.php'; include '../framework/model.class.php'; include '../framework/helper.class.php'; -/* 实例化路由对象,加载配置,连接到数据库。*/ +/* 实例化路由对象,加载配置。*/ $app = router::createApp('pms', dirname(dirname(__FILE__))); $config = $app->loadConfig('common'); +$app->setDebug(); /* 检查是否已经安装过。*/ if(!isset($_SESSION['installing']) and isset($config->installed) and $config->installed) die(header('location: index.php')); diff --git a/www/upgrade.php b/www/upgrade.php index 43db898b39..f5102edf5c 100644 --- a/www/upgrade.php +++ b/www/upgrade.php @@ -21,7 +21,7 @@ * @version $Id$ * @link http://www.zentao.cn */ -error_reporting(E_ALL); +error_reporting(0); /* 包含必须的类文件。*/ include '../framework/router.class.php'; @@ -32,6 +32,7 @@ include '../framework/helper.class.php'; /* 实例化路由对象,加载配置,连接到数据库。*/ $app = router::createApp('pms', dirname(dirname(__FILE__))); $config = $app->loadConfig('common'); +$app->setDebug(); /* 重新设置config参数,进行升级。*/ $config->set('requestType', 'GET');