Skip to content

Commit

Permalink
IN: die first step of the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
rGaillard committed Jun 9, 2016
1 parent 479aaec commit b8e2137
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions install-dev/models/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,17 @@ class InstallModelInstall extends InstallAbstractModel
{
const SETTINGS_FILE = 'config/settings.inc.php';

/**
* @var FileLogger
*/
public $logger;

public function __construct()
public function setError($errors)
{
parent::__construct();
static $logger = null;

$cacheDir = _PS_ROOT_DIR_.'/app/logs/';
$file = $cacheDir .(_PS_MODE_DEV_ ? 'dev' : 'prod').'_'.@date('Ymd').'_installation.log';
$this->logger = new FileLogger();
$this->logger->setFilename($file);
}
if (null === $logger) {
$cacheDir = _PS_ROOT_DIR_.'/app/logs/';
$file = $cacheDir .(_PS_MODE_DEV_ ? 'dev' : 'prod').'_'.@date('Ymd').'_installation.log';
$logger = new FileLogger();
$logger->setFilename($file);
}

public function setError($errors)
{
if (!is_array($errors)) {
$errors = array($errors);
}
Expand Down

0 comments on commit b8e2137

Please sign in to comment.