diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-27 18:33:22 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-07-28 15:18:48 +0300 |
commit | 066ac4f6a8d265ebcaeb754da8f321961db1ffb5 (patch) | |
tree | fb47838c6a7fca8db32c220647f4ccfb37ca3160 /lib | |
parent | fe9dee376d9e1e6f9d8f9b7adc6159f2c43e4213 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/util.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 5e4897b8954..ef0b840342a 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -831,9 +831,15 @@ class OC_Util { } if(function_exists('xml_parser_create') && - version_compare('2.7.0', LIBXML_DOTTED_VERSION) === 1) { + LIBXML_LOADED_VERSION < 20700 ) { + $version = LIBXML_LOADED_VERSION; + $major = floor($version/10000); + $version -= ($major * 10000); + $minor = floor($version/100); + $version -= ($minor * 100); + $patch = $version; $errors[] = array( - 'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [LIBXML_DOTTED_VERSION]), + 'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [$major . '.' . $minor . '.' . $patch]), 'hint' => $l->t('To fix this issue update your libxml2 version and restart your web server.') ); } |