Skip to content

Commit f9dd2fc

Browse files
committed
Add file_exists check to prevent require fatal.
1 parent 4ce0a7f commit f9dd2fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

layers/bootstrap.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php declare(strict_types=1);
22

3+
$appRoot = getenv('LAMBDA_TASK_ROOT');
4+
35
if (getenv('BREF_AUTOLOAD_PATH')) {
46
require getenv('BREF_AUTOLOAD_PATH');
5-
} else {
6-
$appRoot = getenv('LAMBDA_TASK_ROOT');
7-
7+
} elseif (file_exists($appRoot . '/vendor/autoload.php')) {
88
require $appRoot . '/vendor/autoload.php';
99
}
1010

0 commit comments

Comments
 (0)