Skip to content
Snippets Groups Projects
Commit 30a5758a authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Don't check for `always_populate_raw_post_data` on HHVM

HHVM seems to have problems with this at the moment (even setting those values in the php.ini of HHVM doesn't have helped much) and thus the unit test execution failed.

So it's better if we disable this check for now for HHVM.
parent 3a66b7c6
No related branches found
No related tags found
No related merge requests found
...@@ -633,9 +633,14 @@ class OC_Util { ...@@ -633,9 +633,14 @@ class OC_Util {
* PHP 5.6 ships with a PHP setting which throws notices by default for a * PHP 5.6 ships with a PHP setting which throws notices by default for a
* lot of endpoints. Thus we need to ensure that the value is set to -1 * lot of endpoints. Thus we need to ensure that the value is set to -1
* *
* FIXME: Due to https://github.com/owncloud/core/pull/13593#issuecomment-71178078
* this check is disabled for HHVM at the moment. This should get re-evaluated
* at a later point.
*
* @link https://github.com/owncloud/core/issues/13592 * @link https://github.com/owncloud/core/issues/13592
*/ */
if(version_compare(phpversion(), '5.6.0', '>=') && if(version_compare(phpversion(), '5.6.0', '>=') &&
!self::runningOnHhvm() &&
\OC::$server->getIniWrapper()->getNumeric('always_populate_raw_post_data') !== -1) { \OC::$server->getIniWrapper()->getNumeric('always_populate_raw_post_data') !== -1) {
$errors[] = array( $errors[] = array(
'error' => $l->t('PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code.'), 'error' => $l->t('PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code.'),
...@@ -1240,6 +1245,15 @@ class OC_Util { ...@@ -1240,6 +1245,15 @@ class OC_Util {
return (strtoupper(substr(PHP_OS, 0, 6)) === 'DARWIN'); return (strtoupper(substr(PHP_OS, 0, 6)) === 'DARWIN');
} }
/**
* Checks whether server is running on HHVM
*
* @return bool True if running on HHVM, false otherwise
*/
public static function runningOnHhvm() {
return defined('HHVM_VERSION');
}
/** /**
* Handles the case that there may not be a theme, then check if a "default" * Handles the case that there may not be a theme, then check if a "default"
* theme exists and take that one * theme exists and take that one
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment