mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-23 23:32:39 +01:00
Remove an outdated PHP 5.3 check in utils
Summary: `parse_ini_string()` has been available since PHP 5.3.0: https://www.php.net/manual/en/function.parse-ini-string.php `INI_SCANNER_RAW` was introduced in PHP 5.3.0 (and received several bug fixes on the way to PHP 5.4.10): https://www.php.net/ChangeLog-5.php Phorge requires PHP 7.2 nowadays; before rP7d8c84a7bdc8fb43674341b97c36c9d8ae1d894a Phorge already required PHP 5.5. Thus remove this outdated check. Test Plan: Read the docs. Reviewers: O1 Blessed Committers, speck Reviewed By: O1 Blessed Committers, speck Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25808
This commit is contained in:
parent
9f66bff5f6
commit
3f893c1484
1 changed files with 1 additions and 16 deletions
|
@ -1449,22 +1449,7 @@ function phutil_ini_decode($string) {
|
|||
$trap = new PhutilErrorTrap();
|
||||
|
||||
try {
|
||||
$have_call = false;
|
||||
if (function_exists('parse_ini_string')) {
|
||||
if (defined('INI_SCANNER_RAW')) {
|
||||
$results = @parse_ini_string($string, true, INI_SCANNER_RAW);
|
||||
$have_call = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$have_call) {
|
||||
throw new PhutilMethodNotImplementedException(
|
||||
pht(
|
||||
'%s is not compatible with your version of PHP (%s). This function '.
|
||||
'is only supported on PHP versions newer than 5.3.0.',
|
||||
__FUNCTION__,
|
||||
phpversion()));
|
||||
}
|
||||
|
||||
if ($results === false) {
|
||||
throw new PhutilINIParserException(trim($trap->getErrorsAsString()));
|
||||
|
|
Loading…
Reference in a new issue