Merge pull request #38857 from joshtrichards/jr-earlier-check-for-php-xml

This commit is contained in:
John Molakvoæ 2024-08-16 12:43:32 +02:00 committed by GitHub
commit b8b81254f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -652,6 +652,13 @@ class OC {
$bootstrapCoordinator->runInitialRegistration();
$eventLogger->start('init_session', 'Initialize session');
// Check for PHP SimpleXML extension earlier since we need it before our other checks and want to provide a useful hint for web users
// see https://github.com/nextcloud/server/pull/2619
if (!function_exists('simplexml_load_file')) {
throw new \OCP\HintException('The PHP SimpleXML/PHP-XML extension is not installed.', 'Install the extension or make sure it is enabled.');
}
OC_App::loadApps(['session']);
if (!self::$CLI) {
self::initSession();