mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-21 22:32:41 +01:00
Fix a PHP 8.1 issue related to preg_match() and null subject
Summary: This change fixes 'arc patch' in some circumstances. Closes T15254 Test Plan: I was able to run "arc patch D25111" without issues Reviewers: O1 Blessed Committers, Matthew Reviewed By: O1 Blessed Committers, Matthew Subscribers: speck, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15187, T15254 Differential Revision: https://we.phorge.it/D25123
This commit is contained in:
parent
08dfffd5ca
commit
f4a639944d
1 changed files with 1 additions and 1 deletions
|
@ -600,7 +600,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
||||||
public function getCanonicalRevisionName($string) {
|
public function getCanonicalRevisionName($string) {
|
||||||
$match = null;
|
$match = null;
|
||||||
|
|
||||||
if (preg_match('/@([0-9]+)$/', $string, $match)) {
|
if ($string !== null && preg_match('/@([0-9]+)$/', $string, $match)) {
|
||||||
$stdout = $this->getHashFromFromSVNRevisionNumber($match[1]);
|
$stdout = $this->getHashFromFromSVNRevisionNumber($match[1]);
|
||||||
} else {
|
} else {
|
||||||
list($stdout) = $this->execxLocal(
|
list($stdout) = $this->execxLocal(
|
||||||
|
|
Loading…
Reference in a new issue