Page MenuHomePhorge

D25397.1736647675.diff
No OneTemporary

D25397.1736647675.diff

diff --git a/src/applications/diffusion/request/DiffusionMercurialRequest.php b/src/applications/diffusion/request/DiffusionMercurialRequest.php
--- a/src/applications/diffusion/request/DiffusionMercurialRequest.php
+++ b/src/applications/diffusion/request/DiffusionMercurialRequest.php
@@ -3,6 +3,9 @@
final class DiffusionMercurialRequest extends DiffusionRequest {
protected function isStableCommit($symbol) {
+ if ($symbol === null) {
+ return false;
+ }
return preg_match('/^[a-f0-9]{40}\z/', $symbol);
}
@@ -10,11 +13,9 @@
if ($this->branch) {
return $this->branch;
}
-
if ($this->repository) {
return $this->repository->getDefaultBranch();
}
-
throw new Exception(pht('Unable to determine branch!'));
}
diff --git a/src/applications/diffusion/request/DiffusionSvnRequest.php b/src/applications/diffusion/request/DiffusionSvnRequest.php
--- a/src/applications/diffusion/request/DiffusionSvnRequest.php
+++ b/src/applications/diffusion/request/DiffusionSvnRequest.php
@@ -3,6 +3,9 @@
final class DiffusionSvnRequest extends DiffusionRequest {
protected function isStableCommit($symbol) {
+ if ($symbol === null) {
+ return false;
+ }
return preg_match('/^[1-9]\d*\z/', $symbol);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 12, 02:07 (6 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1111627
Default Alt Text
D25397.1736647675.diff (1 KB)

Event Timeline