Skip to content

Commit 740349f

Browse files
committed
libxml - compare against loaded version
* if the compiled in version is older than the loaded version Nextcloud doesn't work * uses the loaded libxml version to check against fixes #205
1 parent a61736c commit 740349f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/private/legacy/util.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,15 @@ public static function checkServer(\OCP\IConfig $config) {
833833
}
834834

835835
if(function_exists('xml_parser_create') &&
836-
version_compare('2.7.0', LIBXML_DOTTED_VERSION) === 1) {
836+
LIBXML_LOADED_VERSION < 20700 ) {
837+
$version = LIBXML_LOADED_VERSION;
838+
$major = floor($version/10000);
839+
$version -= ($major * 10000);
840+
$minor = floor($version/100);
841+
$version -= ($minor * 100);
842+
$patch = $version;
837843
$errors[] = array(
838-
'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [LIBXML_DOTTED_VERSION]),
844+
'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [$major . '.' . $minor . '.' . $patch]),
839845
'hint' => $l->t('To fix this issue update your libxml2 version and restart your web server.')
840846
);
841847
}

0 commit comments

Comments
 (0)