Page MenuHomePhabricator

D11264.id27063.diff
No OneTemporary

D11264.id27063.diff

diff --git a/src/lint/linter/ArcanistPhpLinter.php b/src/lint/linter/ArcanistPhpLinter.php
--- a/src/lint/linter/ArcanistPhpLinter.php
+++ b/src/lint/linter/ArcanistPhpLinter.php
@@ -39,15 +39,11 @@
}
public function getVersion() {
- list($stdout) = execx('%C --version', $this->getExecutableCommand());
-
- $matches = array();
- $regex = '/^PHP (?P<version>\d+\.\d+\.\d+)\b/';
- if (preg_match($regex, $stdout, $matches)) {
- return $matches['version'];
- } else {
- return false;
- }
+ list($stdout) = execx(
+ '%C --run %s',
+ $this->getExecutableCommand(),
+ 'echo phpversion();');
+ return $stdout;
}
public function shouldExpectCommandErrors() {

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 10, 2:59 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7450930
Default Alt Text
D11264.id27063.diff (718 B)

Event Timeline