diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-07-28 11:26:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-28 11:26:06 +0200 |
commit | d6c680051cd1d0a661c9a2b0201d4ab48005a077 (patch) | |
tree | 0da228e65e6994f813c15eb2f3807aef0ddf26f6 /lib/private | |
parent | 9ebd0914b7442e68105a962990497c7b54adaf97 (diff) | |
parent | 740349fda3273409b35b94c8f105a1e65d8bc1fc (diff) | |
download | nextcloud-server-d6c680051cd1d0a661c9a2b0201d4ab48005a077.tar.gz nextcloud-server-d6c680051cd1d0a661c9a2b0201d4ab48005a077.zip |
Merge pull request #612 from nextcloud/improve-xml-loaded-version-handling
libxml - compare against loaded version
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/legacy/util.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index f3a79311a18..83274f82792 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -833,9 +833,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.') ); } |