Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15304345
D20145.id48091.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
872 B
Referenced Files
None
Subscribers
None
D20145.id48091.diff
View Options
diff --git a/src/utils/utils.php b/src/utils/utils.php
--- a/src/utils/utils.php
+++ b/src/utils/utils.php
@@ -1320,7 +1320,15 @@
$trap = new PhutilErrorTrap();
try {
- if (!function_exists('parse_ini_string')) {
+ $have_call = false;
+ if (function_exists('parse_ini_string')) {
+ if (constant('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 '.
@@ -1329,8 +1337,6 @@
phpversion()));
}
- $results = @parse_ini_string($string, true, INI_SCANNER_RAW);
-
if ($results === false) {
throw new PhutilINIParserException(trim($trap->getErrorsAsString()));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 1:38 AM (2 w, 23 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7312974
Default Alt Text
D20145.id48091.diff (872 B)
Attached To
Mode
D20145: Make libphutil `utils.php` PHP version violations statically analyzable
Attached
Detach File
Event Timeline
Log In to Comment