Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/binary/PhutilDiffBinaryAnalyzer.php
Context not available. | |||||
public static function parseDiffBinaryVersion($stdout) { | public static function parseDiffBinaryVersion($stdout) { | ||||
$prefix = 'diff (GNU diffutils) '; | $prefix = 'diff (GNU diffutils) '; | ||||
if (preg_match('(^'.preg_quote($prefix).')', $stdout)) { | if (@preg_match('(^'.preg_quote($prefix).')', $stdout)) { | ||||
$lines = phutil_split_lines($stdout, false); | $lines = phutil_split_lines($stdout, false); | ||||
$line = head($lines); | $line = head($lines); | ||||
$version = substr($line, strlen($prefix)); | $version = @substr($line, @strlen($prefix)); | ||||
return $version; | return $version; | ||||
} | } | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0