Skip to content

Commit 170a6f9

Browse files
fix: autoload if autoloader exists
1 parent 020a0ad commit 170a6f9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

broken-link-detector.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@
3636
/**
3737
* Autoload plugin classes, if dependencies are installed.
3838
*/
39-
try {
40-
require_once __DIR__ . '/vendor/autoload.php';
41-
} catch (Exception $e) {
42-
throw new Exception($e->getMessage());
39+
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
40+
require __DIR__ . '/vendor/autoload.php';
4341
}
4442

4543
/**
@@ -88,4 +86,4 @@
8886
$registry,
8987
$config,
9088
$cliRunner
91-
);
89+
);

0 commit comments

Comments
 (0)