Skip to content

Commit 15411f1

Browse files
author
Fredrick Peter
committed
AutoLoadEnv Start - Error Fix
1 parent fcc4a67 commit 15411f1

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Prior to installing `php-orm-database` get the [Composer](https://getcomposer.or
108108
**Step 1** — update your `composer.json`:
109109
```composer.json
110110
"require": {
111-
"peterson/php-orm-database": "^3.1.9"
111+
"peterson/php-orm-database": "^4.0.1"
112112
}
113113
```
114114

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"extra": {
4040
"branch-alias": {
41-
"dev-main": "3.1.9-dev"
41+
"dev-main": "4.0.1-dev"
4242
}
4343
},
4444
"minimum-stability": "stable",

src/AutoloadEnv.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static protected function createDummy()
192192
// only create when files are not present
193193
if(self::isDummyNotPresent()){
194194
// create for init
195-
if(!file_exists($paths['init']['path']) && !is_dir($paths['init']['path'])){
195+
if(!file_exists($paths['init']['path'])){
196196
// Read the contents of the dummy file
197197
$dummyContent = file_get_contents($paths['init']['dummy']);
198198

@@ -201,7 +201,7 @@ static protected function createDummy()
201201
}
202202

203203
// create for gitignore
204-
if(!file_exists($paths['gitignore']['path']) && !is_dir($paths['gitignore']['path'])){
204+
if(!file_exists($paths['gitignore']['path'])){
205205
// Read the contents of the dummy file
206206
$dummyContent = file_get_contents($paths['gitignore']['dummy']);
207207

@@ -210,7 +210,7 @@ static protected function createDummy()
210210
}
211211

212212
// create for htaccess
213-
if(!file_exists($paths['htaccess']['path']) && !is_dir($paths['htaccess']['path'])){
213+
if(!file_exists($paths['htaccess']['path'])){
214214
// Read the contents of the dummy file
215215
$dummyContent = file_get_contents($paths['htaccess']['dummy']);
216216

@@ -219,7 +219,7 @@ static protected function createDummy()
219219
}
220220

221221
// create for phpini
222-
if(!file_exists($paths['phpini']['path']) && !is_dir($paths['phpini']['path'])){
222+
if(!file_exists($paths['phpini']['path'])){
223223
// Read the contents of the dummy file
224224
$dummyContent = file_get_contents($paths['phpini']['dummy']);
225225

@@ -228,7 +228,7 @@ static protected function createDummy()
228228
}
229229

230230
// create for userini
231-
if(!file_exists($paths['userini']['path']) && !is_dir($paths['userini']['path'])){
231+
if(!file_exists($paths['userini']['path'])){
232232
// Read the contents of the dummy file
233233
$dummyContent = file_get_contents($paths['userini']['dummy']);
234234

@@ -249,33 +249,33 @@ static private function isDummyNotPresent()
249249
$present = [false];
250250

251251
// create for init
252-
if(file_exists($paths['init']['path']) && !is_dir($paths['init']['path'])){
252+
if(!file_exists($paths['init']['path'])){
253253
$present[] = true;
254254
}
255255

256256
// create for gitignore
257-
if(file_exists($paths['gitignore']['path']) && !is_dir($paths['gitignore']['path'])){
257+
if(!file_exists($paths['gitignore']['path'])){
258258
$present[] = true;
259259
}
260260

261261
// create for htaccess
262-
if(file_exists($paths['htaccess']['path']) && !is_dir($paths['htaccess']['path'])){
262+
if(!file_exists($paths['htaccess']['path'])){
263263
$present[] = true;
264264
}
265265

266266
// create for phpini
267-
if(file_exists($paths['phpini']['path']) && !is_dir($paths['phpini']['path'])){
267+
if(!file_exists($paths['phpini']['path'])){
268268
$present[] = true;
269269
}
270270

271271
// create for userini
272-
if(file_exists($paths['userini']['path']) && !is_dir($paths['userini']['path'])){
272+
if(!file_exists($paths['userini']['path'])){
273273
$present[] = true;
274274
}
275275

276276
// Check if all elements in $present are false
277277
$allFalse = empty(array_filter($present));
278-
278+
279279
// All elements in $present are false
280280
if ($allFalse) {
281281
return false;

0 commit comments

Comments
 (0)