Skip to content

Commit 58a99dd

Browse files
author
Fredrick Peter
committed
Env::createOrIgnore() error fix
1 parent 57c2065 commit 58a99dd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Env.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ static public function createOrIgnore()
144144
{
145145
// file to file
146146
$pathToFile = self::formatWithBaseDirectory('.env');
147+
148+
// when system path is empty
149+
if(empty(self::$sym_path)){
150+
new static();
151+
}
147152

148153
// only attempt to create file if direcotry if valid
149154
if(is_dir(self::$sym_path)){
@@ -308,8 +313,8 @@ static private function createDir_AndFiles($directory = null, $filename = null)
308313
{
309314
// if system path is null
310315
// calling the `new self()` will initalize the class and set the default path for us
311-
if(is_null(self::$sym_path)){
312-
new self();
316+
if(empty(self::$sym_path)){
317+
new static();
313318
}
314319

315320
// if \storage folder not found

0 commit comments

Comments
 (0)