diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-01-22 23:59:52 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-01-22 23:59:52 +0100 |
commit | 7e4afa3f2549dddfb9e3cc36d7625c653b5563e6 (patch) | |
tree | 1b3376f6d54e6b645c7a446a7aea625494920a7a /lib | |
parent | 254a1fa12a4d2f1be95f2edc84f209b92e9d91d2 (diff) | |
parent | 4403c194c1a4b439c2feb9a7c7740da1632827fa (diff) | |
download | nextcloud-server-7e4afa3f2549dddfb9e3cc36d7625c653b5563e6.tar.gz nextcloud-server-7e4afa3f2549dddfb9e3cc36d7625c653b5563e6.zip |
Merge pull request #13593 from owncloud/add-check-for-raw-post-data
Add check for `HTTP_RAW_POST_DATA` setting for >= 5.6
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/util.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index e2b7eed1ba5..35b86da5d53 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -628,10 +628,25 @@ class OC_Util { ); $webServerRestart = true; } + + /** + * 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 + * + * @link https://github.com/owncloud/core/issues/13592 + */ + if(version_compare(phpversion(), '5.6.0', '>=') && + \OC::$server->getIniWrapper()->getNumeric('always_populate_raw_post_data') !== -1) { + $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.'), + 'hint' => $l->t('To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini') + ); + } + if (!self::isAnnotationsWorking()) { $errors[] = array( - 'error' => 'PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.', - 'hint' => 'This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.' + 'error' => $l->t('PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.'), + 'hint' => $l->t('This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.') ); } |