Skip to content

Commit

Permalink
Merge pull request #142 from KorvinSzanto/error-without-vendor
Browse files Browse the repository at this point in the history
Add file_exists check to prevent early require fatal
  • Loading branch information
mnapoli authored Nov 24, 2023
2 parents 4ce0a7f + f9dd2fc commit 103cb8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layers/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php declare(strict_types=1);

$appRoot = getenv('LAMBDA_TASK_ROOT');

if (getenv('BREF_AUTOLOAD_PATH')) {
require getenv('BREF_AUTOLOAD_PATH');
} else {
$appRoot = getenv('LAMBDA_TASK_ROOT');

} elseif (file_exists($appRoot . '/vendor/autoload.php')) {
require $appRoot . '/vendor/autoload.php';
}

Expand Down

0 comments on commit 103cb8f

Please sign in to comment.