Skip to content

Commit

Permalink
Fix .settings.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ProklUng committed Jul 22, 2021
1 parent a776c08 commit 02f2325
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 4 additions & 2 deletions environments/default/bitrix/.settings.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Symfony\Component\Dotenv\Dotenv;

if (!file_exists($autoloadPath = realpath(__DIR__).'/../vendor/autoload.php')) {

Expand All @@ -8,8 +9,9 @@

require_once($autoloadPath) ;

$dotenv = new Dotenv\Dotenv(realpath(__DIR__.'/../'));
$dotenv->load();
$dotenv = new Dotenv();

$dotenv->load(realpath(__DIR__.'/../') . '/.env');

$cache = array (
'value' => array (
Expand Down
7 changes: 5 additions & 2 deletions environments/dev/bitrix/.settings.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?php

use Symfony\Component\Dotenv\Dotenv;

if (!file_exists($autoloadPath = realpath(__DIR__).'/../vendor/autoload.php')) {

$autoloadPath = realpath(__DIR__).'/../../current/vendor/autoload.php';
}

require_once($autoloadPath) ;

$dotenv = new Dotenv\Dotenv(realpath(__DIR__.'/../'));
$dotenv->load();
$dotenv = new Dotenv();

$dotenv->load(realpath(__DIR__.'/../') . '/.env');

return array (
'utf_mode' =>
Expand Down
7 changes: 5 additions & 2 deletions environments/prod/bitrix/.settings.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?php

use Symfony\Component\Dotenv\Dotenv;

if (!file_exists($autoloadPath = realpath(__DIR__).'/../vendor/autoload.php')) {

$autoloadPath = realpath(__DIR__).'/../../current/vendor/autoload.php';
}

require_once($autoloadPath) ;

$dotenv = new Dotenv\Dotenv(realpath(__DIR__.'/../'));
$dotenv->load();
$dotenv = new Dotenv();

$dotenv->load(realpath(__DIR__.'/../') . '/.env');

return array (
'utf_mode' =>
Expand Down

0 comments on commit 02f2325

Please sign in to comment.