Page MenuHomePhabricator

D12518.diff
No OneTemporary

D12518.diff

diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php
--- a/src/lint/linter/ArcanistXHPASTLinter.php
+++ b/src/lint/linter/ArcanistXHPASTLinter.php
@@ -500,13 +500,17 @@
}
private function lintPHPCompatibility(XHPASTNode $root) {
+ static $compat_info;
+
if (!$this->version) {
return;
}
- $target = phutil_get_library_root('phutil').
- '/../resources/php_compat_info.json';
- $compat_info = phutil_json_decode(Filesystem::readFile($target));
+ if ($compat_info === null) {
+ $target = phutil_get_library_root('phutil').
+ '/../resources/php_compat_info.json';
+ $compat_info = phutil_json_decode(Filesystem::readFile($target));
+ }
// Create a whitelist for symbols which are being used conditionally.
$whitelist = array(

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 15, 1:31 PM (4 w, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6713006
Default Alt Text
D12518.diff (843 B)

Event Timeline