From 007ee4d858ef9489f9ae191db4ccffb47f6258e9 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Tue, 13 Nov 2018 17:36:03 +0100 Subject: [PATCH] [Bridge] Fix broken bridge initialization Commit e26d61e introduced a bug that causes the error message "The bridge you [sic!] looking for does not exist." if the bridge name specified in the query ends on "Bridge" (i.e. '&bridge=SoundcloudBridge'), while other queries work fine (i.e. '&bridge=Soundcloud'). This commit fixes that issue by sanitizing the bridge name before creating the class. References #922 --- lib/Bridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Bridge.php b/lib/Bridge.php index 8c84a2c4..378f2979 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -28,7 +28,7 @@ EOD; throw new \InvalidArgumentException($message); } - $nameBridge = $nameBridge . 'Bridge'; + $nameBridge = Bridge::sanitizeBridgeName($nameBridge) . 'Bridge'; $pathBridge = self::getDir() . $nameBridge . '.php'; if(!file_exists($pathBridge)) {