diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-03-01 12:12:01 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-03-01 12:12:01 +0100 |
commit | 36a4ee27ba858b75a22989a5cddc1daa06693ed0 (patch) | |
tree | 4a8236dca5b45d69865c7bc1b2e2ec6554170d22 | |
parent | ff85d38c2a96ae5d03555e8289911fec73976a68 (diff) | |
parent | d0c6af2cb5c06b27e4a168c4cf495e295794a29a (diff) | |
download | nextcloud-server-36a4ee27ba858b75a22989a5cddc1daa06693ed0.tar.gz nextcloud-server-36a4ee27ba858b75a22989a5cddc1daa06693ed0.zip |
Merge pull request #14605 from owncloud/checkserver-disable-hhvm
Disable some server checks when running on HHVM
-rw-r--r-- | lib/private/util.php | 58 | ||||
-rw-r--r-- | tests/bootstrap.php | 8 |
2 files changed, 38 insertions, 28 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 3f06f0efffc..3a0d7f653ed 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -608,36 +608,44 @@ class OC_Util { $invalidIniSettings = []; $moduleHint = $l->t('Please ask your server administrator to install the module.'); - foreach ($dependencies['classes'] as $class => $module) { - if (!class_exists($class)) { - $missingDependencies[] = $module; - } - } - foreach ($dependencies['functions'] as $function => $module) { - if (!function_exists($function)) { - $missingDependencies[] = $module; - } - } - foreach ($dependencies['defined'] as $defined => $module) { - if (!defined($defined)) { - $missingDependencies[] = $module; + /** + * FIXME: The dependency check does not work properly on HHVM on the moment + * and prevents installation. Once HHVM is more compatible with our + * approach to check for these values we should re-enable those + * checks. + */ + if (!self::runningOnHhvm()) { + foreach ($dependencies['classes'] as $class => $module) { + if (!class_exists($class)) { + $missingDependencies[] = $module; + } } - } - foreach($dependencies['ini'] as $setting => $expected) { - $iniWrapper = \OC::$server->getIniWrapper(); - if(is_bool($expected)) { - if($iniWrapper->getBool($setting) !== $expected) { - $invalidIniSettings[] = [$setting, $expected]; + foreach ($dependencies['functions'] as $function => $module) { + if (!function_exists($function)) { + $missingDependencies[] = $module; } } - if(is_int($expected)) { - if($iniWrapper->getNumeric($setting) !== $expected) { - $invalidIniSettings[] = [$setting, $expected]; + foreach ($dependencies['defined'] as $defined => $module) { + if (!defined($defined)) { + $missingDependencies[] = $module; } } - if(is_string($expected)) { - if(strtolower($iniWrapper->getString($setting)) !== strtolower($expected)) { - $invalidIniSettings[] = [$setting, $expected]; + foreach ($dependencies['ini'] as $setting => $expected) { + $iniWrapper = \OC::$server->getIniWrapper(); + if (is_bool($expected)) { + if ($iniWrapper->getBool($setting) !== $expected) { + $invalidIniSettings[] = [$setting, $expected]; + } + } + if (is_int($expected)) { + if ($iniWrapper->getNumeric($setting) !== $expected) { + $invalidIniSettings[] = [$setting, $expected]; + } + } + if (is_string($expected)) { + if (strtolower($iniWrapper->getString($setting)) !== strtolower($expected)) { + $invalidIniSettings[] = [$setting, $expected]; + } } } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index e1dc1076a4f..cebd899e785 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -6,9 +6,11 @@ if ($configDir) { define('PHPUNIT_CONFIG_DIR', $configDir); } -if(version_compare(phpversion(), '5.6.0', '>=') && - ini_get('always_populate_raw_post_data') !== '-1') { - throw new Exception("'always_populate_raw_post_data' has to be set to '-1' in your php.ini"); +if (!defined('HHVM_VERSION')) { + if(version_compare(phpversion(), '5.6.0', '>=') && + ini_get('always_populate_raw_post_data') !== '-1') { + throw new Exception("'always_populate_raw_post_data' has to be set to '-1' in your php.ini"); + } } require_once __DIR__ . '/../lib/base.php'; |