Merge pull request #15385 from nextcloud/bugfix/noid/broken-federated-shares
Make sure all middlewares are only registered once
This commit is contained in:
commit
0e6e2a9ac6
1 changed files with 3 additions and 0 deletions
|
@ -299,6 +299,9 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
* @return boolean|null
|
||||
*/
|
||||
public function registerMiddleWare($middleWare) {
|
||||
if (in_array($middleWare, $this->middleWares, true) !== false) {
|
||||
return false;
|
||||
}
|
||||
$this->middleWares[] = $middleWare;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue