mirror of
https://github.com/nextcloud/server.git
synced 2026-03-02 21:41:12 -05:00
Merge pull request #27670 from nextcloud/backport/27663/stable21
[stable21] Unshift crash reports when they are loaded, to break the recusion
This commit is contained in:
commit
22d2f05841
1 changed files with 2 additions and 3 deletions
|
|
@ -36,6 +36,7 @@ use OCP\Support\CrashReport\IMessageReporter;
|
|||
use OCP\Support\CrashReport\IRegistry;
|
||||
use OCP\Support\CrashReport\IReporter;
|
||||
use Throwable;
|
||||
use function array_shift;
|
||||
|
||||
class Registry implements IRegistry {
|
||||
|
||||
|
|
@ -120,8 +121,7 @@ class Registry implements IRegistry {
|
|||
}
|
||||
|
||||
private function loadLazyProviders(): void {
|
||||
$classes = $this->lazyReporters;
|
||||
foreach ($classes as $class) {
|
||||
while (($class = array_shift($this->lazyReporters)) !== null) {
|
||||
try {
|
||||
/** @var IReporter $reporter */
|
||||
$reporter = $this->serverContainer->query($class);
|
||||
|
|
@ -152,6 +152,5 @@ class Registry implements IRegistry {
|
|||
]);
|
||||
}
|
||||
}
|
||||
$this->lazyReporters = [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue