summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index d2dc365d835..988313f20e8 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -38,6 +38,7 @@ use OCP\Dashboard\IManager;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\ILogger;
use Throwable;
+use function array_shift;
class RegistrationContext {
@@ -399,7 +400,7 @@ class RegistrationContext {
}
}
- foreach ($this->aliases as $registration) {
+ while (($registration = array_shift($this->aliases)) !== null) {
try {
$apps[$registration['appId']]
->getContainer()
@@ -416,7 +417,7 @@ class RegistrationContext {
}
}
- foreach ($this->parameters as $registration) {
+ while (($registration = array_shift($this->parameters)) !== null) {
try {
$apps[$registration['appId']]
->getContainer()