]> source.dussan.org Git - nextcloud-server.git/commit
Unshift crash reports when they are loaded, to break the recusion 27670/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Thu, 24 Jun 2021 13:31:49 +0000 (15:31 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 25 Jun 2021 06:37:07 +0000 (06:37 +0000)
commit5dd3b5067cbfd6a2f17400d071559afa83042823
treeef6b3de8535d35763204459e9a905ff1ff6aecea
parent4058c4c7dbd55585b4505e3702c9cbc7d628b094
Unshift crash reports when they are loaded, to break the recusion

If, for whatever reason, during the loading of a crash reporter a new
log entry is generated, then the lazy loading mechanism will be invoked
*again* while it's already executed. This doesn't result in an endless
recursion, but means that the crash reporters will be built and
registered many times. This then means any further log entry will be
logged x times instead of once.

Unshift makes sure to take the class off the registration list right
away, so another invokation of the same method won't try to do the same
job.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/private/Support/CrashReport/Registry.php