From 4a34f26a44ae6438bb3b68eb6b9a17c0fb0d161b Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 12 Jan 2017 15:10:58 -0800 Subject: [PATCH] Don't warn about "always_populate_raw_post_data" on PHP7 Summary: Ref T9640. This option was removed in PHP7, so there's no reason to warn about it. Test Plan: No longer saw a setup warning on PHP7. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9640 Differential Revision: https://secure.phabricator.com/D17196 --- .../config/check/PhabricatorPHPConfigSetupCheck.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/applications/config/check/PhabricatorPHPConfigSetupCheck.php b/src/applications/config/check/PhabricatorPHPConfigSetupCheck.php index f286b46f9c..1dd3add94d 100644 --- a/src/applications/config/check/PhabricatorPHPConfigSetupCheck.php +++ b/src/applications/config/check/PhabricatorPHPConfigSetupCheck.php @@ -40,7 +40,13 @@ final class PhabricatorPHPConfigSetupCheck extends PhabricatorSetupCheck { ->setMessage($message); } - $raw_post_data = (int)ini_get('always_populate_raw_post_data'); + if (version_compare(phpversion(), '7', '>=')) { + // This option was removed in PHP7. + $raw_post_data = -1; + } else { + $raw_post_data = (int)ini_get('always_populate_raw_post_data'); + } + if ($raw_post_data != -1) { $summary = pht( 'PHP setting "%s" should be set to "-1" to avoid deprecation '.