Skip to content

Commit

Permalink
Fixes for document root
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevanzuydam committed Jul 4, 2021
1 parent ef316b4 commit f57d431
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Tina4/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ private function parseLine($line): void
*/
final public function readParams(?string $environment): void
{
if (!defined("TINA4_DOCUMENT_ROOT")) {
define("TINA4_DOCUMENT_ROOT", "./");
if (defined("TINA4_DOCUMENT_ROOT")) {
$rootFolder = TINA4_DOCUMENT_ROOT;
} else {
$rootFolder = "./";
}
$fileName = TINA4_DOCUMENT_ROOT . ".env";
$fileName = $rootFolder. ".env";

if (!empty($environment)) {
$fileName .= ".{$environment}";
Expand Down

0 comments on commit f57d431

Please sign in to comment.