mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-31 15:30:01 +02:00
fix: dont fail for non-existing enabled bridge (#3589)
* fix: dont fail for non-existing enabled bridge * yup
This commit is contained in:
parent
10f7b6f4f6
commit
ed97ce8646
4 changed files with 25 additions and 12 deletions
|
@ -37,12 +37,14 @@ class ConnectivityAction implements ActionInterface
|
|||
throw new \Exception('This action is only available in debug mode!');
|
||||
}
|
||||
|
||||
if (!isset($request['bridge'])) {
|
||||
$bridgeName = $request['bridge'] ?? null;
|
||||
if (!$bridgeName) {
|
||||
return render_template('connectivity.html.php');
|
||||
}
|
||||
|
||||
$bridgeClassName = $this->bridgeFactory->createBridgeClassName($request['bridge']);
|
||||
|
||||
$bridgeClassName = $this->bridgeFactory->createBridgeClassName($bridgeName);
|
||||
if (!$bridgeClassName) {
|
||||
throw new \Exception(sprintf('Bridge not found: %s', $bridgeName));
|
||||
}
|
||||
return $this->reportBridgeConnectivity($bridgeClassName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue