diff options
-rw-r--r-- | lib/private/AppFramework/DependencyInjection/DIContainer.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index fc16521cf32..209ea5c876d 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -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; } |