[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
This commit is contained in:
parent
dd95ec6200
commit
007ee4d858
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ EOD;
|
||||||
throw new \InvalidArgumentException($message);
|
throw new \InvalidArgumentException($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
$nameBridge = $nameBridge . 'Bridge';
|
$nameBridge = Bridge::sanitizeBridgeName($nameBridge) . 'Bridge';
|
||||||
$pathBridge = self::getDir() . $nameBridge . '.php';
|
$pathBridge = self::getDir() . $nameBridge . '.php';
|
||||||
|
|
||||||
if(!file_exists($pathBridge)) {
|
if(!file_exists($pathBridge)) {
|
||||||
|
|
Loading…
Reference in a new issue