Forward port of #5190 to master
Forward port of #5190 to master

Treat PHP Errors on User session regenerate

Signed-off-by: Arthur Schiwon <9ae9918f3cbf5a90ebc25affe594cc53853aee42@arthur-schiwon.de>

remove unnecessary lines…

Signed-off-by: Arthur Schiwon <9ae9918f3cbf5a90ebc25affe594cc53853aee42@arthur-schiwon.de>

change PHP errors to ErrorException in the session (PHP >=7)

Otherwise it might be that authentication apps are being disabled on
during operation while in fact the session handler has hiccup.

Signed-off-by: Arthur Schiwon <9ae9918f3cbf5a90ebc25affe594cc53853aee42@arthur-schiwon.de>

michaelletzgus/nextcloud-server,andreas-p/nextcloud-server,nextcloud/server,michaelletzgus/nextcloud-server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,nextcloud/server,andreas-p/nextcloud-server,michaelletzgus/nextcloud-server,andreas-p/nextcloud-server,nextcloud/server,michaelletzgus/nextcloud-server,nextcloud/server