diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-04-27 21:24:33 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-04-28 22:55:15 +0200 |
commit | 4c1b55be92c418b168729d71b0e837b504014a49 (patch) | |
tree | 0a57a778e64438aeb2d318ba1deec25493aa0878 /lib | |
parent | 238dbe9252e50ce38449045a8c2e8115a082bd1a (diff) | |
download | nextcloud-server-4c1b55be92c418b168729d71b0e837b504014a49.tar.gz nextcloud-server-4c1b55be92c418b168729d71b0e837b504014a49.zip |
allow app developers to specify the minimum int size
simplify comparison
remove additional null
fix off by 1 error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/App/DependencyAnalyzer.php | 6 | ||||
-rw-r--r-- | lib/private/App/Platform.php | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php index 6519e15bd8b..1e3a81c6351 100644 --- a/lib/private/App/DependencyAnalyzer.php +++ b/lib/private/App/DependencyAnalyzer.php @@ -145,6 +145,12 @@ class DependencyAnalyzer { $missing[] = (string)$this->l->t('PHP with a version lower than %s is required.', $maxVersion); } } + if (isset($dependencies['php']['@attributes']['min-int-size'])) { + $intSize = $dependencies['php']['@attributes']['min-int-size']; + if ($intSize > $this->platform->getIntSize()*8) { + $missing[] = (string)$this->l->t('%sbit or higher PHP required.', $intSize); + } + } return $missing; } diff --git a/lib/private/App/Platform.php b/lib/private/App/Platform.php index 1d4c3767121..b1cb7c5aeb0 100644 --- a/lib/private/App/Platform.php +++ b/lib/private/App/Platform.php @@ -49,6 +49,13 @@ class Platform { } /** + * @return int + */ + public function getIntSize() { + return PHP_INT_SIZE; + } + + /** * @return string */ public function getOcVersion() { |