Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 129f55e

Browse files
author
Jamie Snape
committed
Fix PDO error when accessing installation page
1 parent 485096b commit 129f55e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/AppController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function preDispatch()
9898
$user->setExpirationSeconds(60 * Zend_Registry::get('configGlobal')->session->lifetime);
9999
}
100100

101-
if($user->Dao == null)
101+
if($user->Dao == null && $fc->getRequest()->getControllerName() != 'install')
102102
{
103103
$userModel = MidasLoader::loadModel('User');
104104
$cookieData = $this->getRequest()->getCookie('midasUtil');

core/Bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ protected function _initConfig()
133133
'message' => 'message',
134134
'datetime' => 'timestamp',
135135
'module' => 'module');
136-
$writerDb = new Zend_Log_Writer_Db($db, 'errorlog', $columnMapping);
137136
if($configGlobal->environment == 'production')
138137
{
139138
$formatter = new Zend_Log_Formatter_Simple();
@@ -162,6 +161,7 @@ protected function _initConfig()
162161
if($configDatabase->database->adapter == 'PDO_MYSQL'
163162
&& $configDatabase->database->params->password != 'set_your_password')
164163
{
164+
$writerDb = new Zend_Log_Writer_Db($db, 'errorlog', $columnMapping);
165165
$logger->addWriter($writerDb);
166166
$logger->setEventItem('datetime', date('Y-m-d H:i:s'));
167167
$logger->setEventItem('module', 'unknown');

0 commit comments

Comments
 (0)